Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

DropdownList - Clear Selected Items

Open MikaelHild opened this issue 1 year ago • 4 comments

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?

MikaelHild avatar Dec 28 '23 09:12 MikaelHild

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?

David-Moreira avatar Dec 28 '23 09:12 David-Moreira

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

stsrki avatar Dec 28 '23 09:12 stsrki

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

David-Moreira avatar Dec 28 '23 09:12 David-Moreira

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

1.4.1 is still unreleased.

stsrki avatar Dec 28 '23 10:12 stsrki