radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.42k stars 763 forks source link

No selected filter value datagrid-enum-filter #1063

Open TiuDerca opened 1 year ago

TiuDerca commented 1 year ago

Selected value of the selected element in dropdown is not set in a simple filter

To Reproduce Open https://blazor.radzen.com/datagrid-enum-filter Change FilterMode="FilterMode.Advanced" to FilterMode="FilterMode.Simple"

https://github.com/radzenhq/radzen-blazor/assets/88079618/7f579222-ece5-4e5d-9f41-a55e56418dec

Possible solution: If remove: possible solution

devenv_2023-07-14_11-42-37

it work:

https://github.com/radzenhq/radzen-blazor/assets/88079618/d323f7a7-e23b-414b-8696-2b9138362e78

But I'm not sure if deleting the code is the right solution.

enchev commented 1 year ago

Hey @TiuDerca,

No, such change will brake the entire value binding. The problem is related to the fact that in this case null is part of possible selected values and the component cannot decide if should clear the value or select null item from the values.