Greetings,
when <RadzenDropDown Multiple="true">
with possible values "A", "B", "C" is used without template, values in the collapsed state are shown this way:
- when only "A" is selected --> "A"
- when "A" and "C" are selected --> "A,C"
But when template is used, there is always trailing comma present, so for example: "(A)," or "(A),(C),".
Two questions:
- Is it possible not showing trailing comma with templates?
- Would it be possible to choose separator string or at least made the default separator string ", " instead of just ","?
I've modified docs multiple example with template to illustrate the problem.
@using RadzenBlazorDemos.Models.Northwind
@inherits DbContextPage
<div class="rz-p-sm-12 rz-text-align-center">
<RadzenDropDown
@bind-Value=@values
Data=@products
TextProperty="ProductName"
ValueProperty="ProductID"
Multiple=true
AllowClear=true
Placeholder="Select products"
Style="width: 100%; max-width: 400px;"
>
<Template Context="val">
<RadzenBadge
Text="@val.ProductName"
Variant="@Variant.Outlined"
BadgeStyle="@BadgeStyle.Info"
IsPill
/>
</Template>
</RadzenDropDown>
</div>
@code {
IEnumerable<int> values = new int[] { 1, 2 };
IEnumerable<Product> products;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
products = dbContext.Products;
}
}