-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect when the input value changed if the user clicked a suggestion or not #6
Comments
Hello Luciano, There two methods on of them is onSelect and another is onChange onSelect: function (value, data) { Thanks From: Luciano Mammino [mailto:notifications@github.com] Is there a built-in way to detect, when the input changes, whether the user clicked a suggestion or not? I looked at the code and i found the field value is set before calling the onSelect callback.
If the onSelect is called before the this.el.val(selectedValue) one would easily detect if the user selected a suggestion on change doing something like this: $('.autocomplete').autocomplete({
}); $('.autocomplete').change(function(){
}); Please let me know if there's a built-in proper way to do so Thanks — |
Thanks @Vytautas-Pranskunas . |
Now i digged further into your code and discovered that your Closing this issue. Thanks anyway! |
Is there a built-in way to detect, when the input changes, whether the user clicked a suggestion or not?
I looked at the code and i found the field value is set before calling the
onSelect
callback.If the
onSelect
is called before thethis.el.val(selectedValue)
one would easily detect if the user selected a suggestion on change doing something like this:Please let me know if there's a built-in proper way to do so
Thanks
The text was updated successfully, but these errors were encountered: