Not sure if a bug or I am possibly doing something wrong.
Whenever I attempt to set the selected filtering data type of an IEnumerable or IEnumerable the DataFilter component does not correctly cast the filter of the selected values and is instead a string text of the cast command.
Here is some of my code:
Component
<RadzenDataFilter @ref="notifDataFilter" Auto=true Data="userNotifications" TItem="Notification" ViewChanged=@(view => notifDataList.Reload()) FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" ClearFilterText="Clear All Filters" LogicalFilterOperator=LogicalFilterOperator.And >
<Properties>
<RadzenDataFilterProperty Property=@nameof(Notification.Action) Title="Action" FilterValue="@finalSelectedActions" Type="typeof(IEnumerable<string>)" FilterOperators=@(new[] { FilterOperator.Contains }) FilterOperator="FilterOperator.Contains">
<FilterTemplate>
<RadzenDropDown @bind-Value=@selectedActions Style="width: 100%;" Change=@OnSelectedActionsChange Data=@(new string[] {"Create", "View", "Update", "Delete"}) AllowClear="false" Multiple="true" />
</FilterTemplate>
</RadzenDataFilterProperty>
</Properties>
</RadzenDataFilter>
IEnumerable<string> selectedActions;
IEnumerable<string> finalSelectedActions;
async Task OnSelectedActionsChange(object value)
{
if (selectedActions != null && !selectedActions.Any())
{
selectedActions = null;
}
finalSelectedActions = selectedActions;
await notifPager.FirstPage();
}
When inspecting the notifDataFilter.Filters property the FilterValue is: {System.Collections.Generic.HashSet
1[System.Object].Cast()}`
Am I doing something wrong or is there a bug here ? I see the demo component on the site works flawlessly which frustrates me. It works when I move from multiple to a single select on a string contains and anything else but when doing mumltiple value selection is the issue.