I have a text box that is wired to JQuery UI Autocomplete. As the user types in the box my search runs via an ajax call and returns suggestions. It seems that three things can happen:
- The autocomplete suggests options and the user selects one of them
- The autocomplete suggests options but the user chooses to select none of them
- The autocomplete can not make a suggestion - no match (so the list of suggestions do not display)
Dealing with all of the scenarios above, how can I tell if the user selects an option from the autocomplete?
I have looked into marking a flag when a search commences (match=false) and a select occurs (match=true) but this doesn't seem a very neat way of doing things.