Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.25k stars 526 forks source link

DropdownList - Clear Selected Items #5205

Open MikaelHild opened 8 months ago

MikaelHild commented 8 months ago

First off, great work!

I've a case where a user might select many items, or where some items have been selected by default. In case there are ~5+ selected items, I'd like the user to be able to clear the selected items so that the multi-selection can be re-done.

I tried to re-bind the Data, but this does not redraw/update the check components of the dropdownlist. So if the selectedValues list is cleared, the items remain checked and once an item is checked, the SelectedValuesChanged event is triggered and set's the selectedValues to it's initial/previous state.

A proposal is to expose a Clear method or similar for the selectedValues, or if it could be solved by using a List instead of a ReadOnlyList for the SelectedValues?

David-Moreira commented 8 months ago

Actually I believe this PR #5187 will fix your problem by being able to set SelectedValues.

@stsrki Has this been released yet? What's the ETA?

stsrki commented 8 months ago

Yes, it is already released. See https://blazorise.com/news/release-notes/134

David-Moreira commented 8 months ago

User did not clarify version. Have we released for 1.4 yet?

stsrki commented 8 months ago

User did not clarify version. Have we released for 1.4 yet?

1.4.1 is still unreleased.