With a filtered listbox, the getSelecteditems take the item by the display index and not with the real index => you don’t get the right selection.
if you apply filter for “andrew” and clic on the select button => in the console, the selected item is “nancy” with the index 0.
Andrew is in the index 1, with the filter the index is 0. if you select the item, jqwdigets get the index 0 “nancy” and not the filtered index 1 for “andrew”
how can i get the right item after a filter ?
You can get the index with the getSelectedIndex, then get all items with getItems and filter them by their visibility.
When you have an array with the visible items you can use the index to access the selected items.
See the btnselect click handler here in your example that I have modified: http://jsfiddle.net/75p4zxv1/
If you have any additional questions, let us know!