This topic contains 4 replies, has 3 voices, and was last updated by pguz 10 years ago.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Lists › ListBox › Unselect event.args.item is null if filterable
Tagged: filterable, jqxListBox, ListBox
This topic contains 4 replies, has 3 voices, and was last updated by pguz 10 years ago.
Hi,
If a ListBox is filterable, the args.item property in the unselect event is null, and index is -1.
See this fiddle using v3.7.1: http://jsfiddle.net/pZWr3/12/
Paul
Hello Paul,
If you want to get the new index or item you should use ‘change’ event instead ‘unselect’. The ‘unselect’ event is triggered when the user unselects an item so you got values equal to null for args.item and -1 for index.
Best Regards,
Nadezhda
jQWidgets team
http://www.jqwidgets.com/
Nadezhda,
I do not want to get the new item, I want to get the item being unselected, as I show and hide a delete icon depending on whether the item is selected.
It works perfectly well when filterable = false.
Please look at the fiddle again – args.item and args.index have values when filterable = true but not when filterable = false.
This looks like a bug to me.
Paul
Hey Paul,
Look at: http://jsfiddle.net/jqwidgets/56t5vf87/ as a solution.
Best Regards,
Peter Stoev
jQWidgets Team
http://www.jqwidgets.com/
Thanks Peter, I will do it that way. I assume that the bug has been noted.
Paul
You must be logged in to reply to this topic.