jQuery-Smart-Auto-Complete icon indicating copy to clipboard operation
jQuery-Smart-Auto-Complete copied to clipboard

Selected items appear again in comma separated list autocomplete

Open mayankk4 opened this issue 13 years ago • 1 comments

In a comma separated list, with auto-completion, after I have already selected an option it shows up again in autocomplete.

eg. If I have already chosen United States as one of my Favourite countries then it should not show up again in autocomplete but it does appear again.

mayankk4 avatar Nov 29 '11 10:11 mayankk4

You can keep the potential results in an array and remove the item which was selected in the itemSelect event handler. Then use the filter function of the plugin to look for matches in that array (Check the examples 5 & 6 in demo for the use of filter function and itemSelect event).

laktek avatar Dec 04 '11 18:12 laktek