This is a migrated thread and some comments may be shown as answers.

BUG: multiselect value after a search corrupts value

5 Answers 346 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
darryl
Top achievements
Rank 1
darryl asked on 16 Sep 2015, 07:59 PM

It would seem after performing a search in multiselect, without selecting an item (just click out to close the search dropdown), corrupts the next value insert.

 I've put together a demonstration in the DOJO:

http://dojo.telerik.com/ISEga/6

 Just run the code and you'll see that the result is not what it should be.  Comment out the search / close lines to see it work properly.

5 Answers, 1 is accepted

Sort by
0
darryl
Top achievements
Rank 1
answered on 16 Sep 2015, 08:20 PM

SO after looking into the kendo search code, I discovered this bug is caused by the fact that the filter is not cleared when the UI for search is closed (like when users click outside of the UI to cancel the search).

 So then when you try to add a new item to the value, you'd only get the ones added that match the filter that is improperly lingering.

Change the search to another letter to prove this.

SOLUTION

Make sure the filter is cleared when then UI is closed.  Its proper UX to assume people will click anywhere else on the page to cancel that search, so filter needs cleared too.

0
darryl
Top achievements
Rank 1
answered on 16 Sep 2015, 09:51 PM

TELERIK
you guys should fix it so that the filter is cleared properly when the UI is closed.  The text that is typed in gets cleared, but the filter on the listview does not.

 

EVERYONE ELSE

If you are struggling with this same issue, the hackfix is to simply clear the filter before dynamically modifying the value of your multiselect.

So, before:

multiSelect.value(['item1','item2'])

just make this call:

multiSelect.listView.dataSource.filter(false);​

(multiSelect is your kendoMultiSelect instance object, ie: multiSelect = $('#myelement').data('kendoMultiSelect');  )

0
Georgi Krustev
Telerik team
answered on 18 Sep 2015, 09:52 AM
Hello darryl,

Currently, the widget designed to clear filter expressions on open. This is done to avoid unnecessary request to the server. Due to that implementation behavior, we suggest the developers to clear the filter manually if they want to set values manually: As to the request for a change in the behavior, I would like to ask you share your thoughts in our UserVoice portal. We will need to gather a community feedback before we undertake such change in the behavior of the widget.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
darryl
Top achievements
Rank 1
answered on 18 Sep 2015, 05:11 PM
[quote]Georgi Krustev said:Hello darryl,

Currently, the widget designed to clear filter expressions on open. This is done to avoid unnecessary request to the server. Due to that implementation behavior, we suggest the developers to clear the filter manually if they want to set values manually: As to the request for a change in the behavior, I would like to ask you share your thoughts in our UserVoice portal. We will need to gather a community feedback before we undertake such change in the behavior of the widget.

Regards,
Georgi Krustev
Telerik
 [/quote]

 

Great, so a slight performance decision outweighs logical functionality.  I really dont think thats the right way to build software.  Break expected functionality to save on a POSSIBLE single call to server?  And even if this was intended why wouldn't ​it be documented?  This *bug* created by an unnecessary performance decision cost us time in implementation as we had to dig through your source to determine why it wasn't acting as expected.  Please if you make decisions to break expected functionalities, at least document it.

 

0
Petyo
Telerik team
answered on 23 Sep 2015, 05:41 AM

Hello darryl,

thanks for your feedback. We will consider creating the necessary help resource for that specific behavior. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MultiSelect
Asked by
darryl
Top achievements
Rank 1
Answers by
darryl
Top achievements
Rank 1
Georgi Krustev
Telerik team
Petyo
Telerik team
Share this question
or