ClearSearchAfterSelection is broken #979

Closed
opened 2026-01-29 17:47:14 +00:00 by claunia · 0 comments
Owner

Originally created by @SGeorgeFramatome on GitHub (Sep 6, 2023).

Describe the bug
DropDown component does not seem to be clearing/refreshing the data list once search is complete with ClearSearchAfterSelection="true" is enabled.

To Reproduce
have dropdown with data, use search to narrow list of items down, pick one. search is cleared on selection, click the dropdown arrow to show list, but list of data shows the filtered list that was initially searched on, not complete list.

Expected behavior
When search is cleared after selection made, list of data should be set back to its non-filtered state.

Screenshots
I hadded ClearSearchAfterSelection="true" to the radzen virtualization dropdown filter example; (you can reproduce bug on any filtereable dropdown).
https://blazor.radzen.com/dropdown-virtualization

image

With no search, we see full unfiltered list (correct)

image

We type "Bl" to filter list, and pick first item,
image

We have our selected item, which should clear search (so far so good)
image

Select dropdown again and search is clear but list is still showing a filtered list based on previous search; (incorrect!),

image

If I type something in search box, then backspace it out to manually clear, it does reset the filtered list back to unfiltered state.

also hitting the "X" for clearing if AllowClear="true" works as well as manually typeing/backspacing to clear.

Additional context
I verified its broken in Radzen 4.15.10.

Originally created by @SGeorgeFramatome on GitHub (Sep 6, 2023). **Describe the bug** DropDown component does not seem to be clearing/refreshing the data list once search is complete with ```ClearSearchAfterSelection="true"``` is enabled. **To Reproduce** have dropdown with data, use search to narrow list of items down, pick one. search is cleared on selection, click the dropdown arrow to show list, but list of data shows the filtered list that was initially searched on, not complete list. **Expected behavior** When search is cleared after selection made, list of data should be set back to its non-filtered state. **Screenshots** I hadded ```ClearSearchAfterSelection="true"``` to the radzen virtualization dropdown filter example; (you can reproduce bug on any filtereable dropdown). https://blazor.radzen.com/dropdown-virtualization ![image](https://github.com/radzenhq/radzen-blazor/assets/116843436/0b66b63a-6737-4f90-8793-b3fcf65570f2) With no search, we see full unfiltered list (correct) ![image](https://github.com/radzenhq/radzen-blazor/assets/116843436/8a8c9771-3e70-417a-b7e6-a598f1ecc068) We type "Bl" to filter list, and pick first item, ![image](https://github.com/radzenhq/radzen-blazor/assets/116843436/f412d6b5-2ec7-40fd-9a71-1d19225c8200) We have our selected item, which should clear search (so far so good) ![image](https://github.com/radzenhq/radzen-blazor/assets/116843436/5a5122f4-f1aa-4d94-a515-0228596b8bed) Select dropdown again and search is clear but list is still showing a filtered list based on previous search; (incorrect!), ![image](https://github.com/radzenhq/radzen-blazor/assets/116843436/f0a3c11c-fe84-4ad7-bbd4-d9cbf9342a1a) If I type something in search box, then backspace it out to manually clear, it does reset the filtered list back to unfiltered state. also hitting the "X" for clearing if ```AllowClear="true"``` works as well as manually typeing/backspacing to clear. **Additional context** I verified its broken in Radzen 4.15.10.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#979