How can I prevent KendoMultiSelect from deleting search term in filter box?

1 Answer 116 Views
MultiSelect
Stephen
Top achievements
Rank 1
Stephen asked on 21 May 2021, 05:35 PM | edited on 24 May 2021, 11:29 PM
After an initial search, if the user selects multiselect line items, and then searches for a different term, upon trying to select another item, the search term box clears itself and the filtered items reload unfiltered.  How can I fix this behavior?

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 26 May 2021, 08:57 AM

Hello Stephen,

As far as I understand you need after filtering is performed in the MultiSelect and an item is selected, the filter to be persisted.

If this is the case I would suggest you subscribe to the select event handler of the MultiSelect. In the event handler, you could check the current value of the MultiSelect input. Then, by using a setTimeout function, you could set the same text to the MultiSelect input.

 select: function(e) {           
      var searchText  = $(e.sender.input).val()
      setTimeout(function(){
            $(e.sender.input).val(searchText )
     })
 }

Here is a Dojo example where this is demonstrated.

I hope you will find the provided information helpful.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
MultiSelect
Asked by
Stephen
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or