I have implemented the ui autocomplete widget.
In my case, I supply a fixed list of suggestions.
When I enter the field and it is filled, I would like to select the suggestion which equals the text in the input field.
Any suggestion how to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For what you need you can add your own handler for open event, where you can decide which of the menu items will be activated. Here is my sample implementation:
You can check the fiddle here.
PS: You might be able to pull the menu object from
uiparameter directly, but I don’t see it documented and right now I am too lazy to investigate that further 😉PS2: Also consider checking for null references when no matches are found which i didn’t include..