MultiSelect's dropdown items remain filtered on clearing filter text through clear button
Bug report
If some text is written to filter items and then the clear button is clicked, the text is deleted, but the filtered results remain visible.
Reproduction of the problem
- Go to https://demos.telerik.com/kendo-ui/multiselect/events
- Type asdf in the MultiSelect - No data found is displayed in the dropdown.
- Click on Clear button - filter text is deleted.
Current behavior
No data found is displayed, although there is no text in the input.
Expected/desired behavior
All items are visible, as there is no filter applied in the input. NOTE: If the filter text is cleared by backspace or delete button, all items are visible as expected. NOTE: Currently clicking on MultiSelect's input clears the filter.
Workaround
Handle the click of the clear button and call MultiSelect's search method with empty string - Dojo snippet :
$(".k-multiselect .k-clear-value").click(function() {
var multiselect = $("#products").data("kendoMultiSelect");
multiselect.search("");
})
Thus, the popup shows all items as expected.
Environment
- Kendo UI version: 2022.3.913
- Browser: [all]
Also reported in ticket 1522276
report in ticket - 1547895
Increased priority due to the following report - https://feedback.telerik.com/kendo-jquery-ui/1582729-for-bug-while-add-new-in-multidrop-down-selection-search-some-text-and-click-on-clear-button-and-than-add-on-add-new-button-now-the-text-is-saved
The issue affects our Demo's custom scenario for adding new item - https://demos.telerik.com/kendo-ui/multiselect/addnewitem
Workaround: handle the click of the clear button and call MultiSelect's search method with empty string - Dojo snippet :
$(".k-multiselect .k-clear-value").click(function() {
var multiselect = $("#products").data("kendoMultiSelect");
multiselect.search("");
})
Thus, the popup shows all items as expected.