-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add autoSelect top-level option #73
base: master
Are you sure you want to change the base?
Conversation
Are you saying that the user pressing Tab or Enter will select an unwanted result by accident? Is it getting in the way of principle of least surprise? |
This is really only useful when using token-less autocomplete in a field where only a predefined set of values are allowed. For instance, you can add autocomplete on a "city" field with hundreds of possible values. Setting autoselect to true in that case guarantees that the user always selects a valid option. This is akin to how a dropdown works. |
I am looking for this exact setting as well, I will test this pull to make sure it works for my use case, which is to provide search string suggestions, but not force the user to select one of the options. Currently typing in whatever you want to search for and clicking enter will select the first option. |
This works perfectly for my situation. I merged this locally with the master branch and it worked as expected. |
+1. I think this should be merge to the master branch. I have the exact context and want to disable auto select top option |
+1 agree with this change |
Hey @nmaquet, I apologize for the delay in responding. I don't have time to maintain this project anymore, so I gave you commit access to make any changes you'd like. It would be nice to follow the style used by the rest of the code and add some tests to this patch. If you'd like permission to publish the package to Meteor as well, please send me your Meteor username. |
Thanks, @mizzao! |
Great, you are now a maintainer: https://atmospherejs.com/mizzao/autocomplete . No pressure to do anything, it's just if you are interested and willing. |
I tried autoSelect :false and autoSelect : "false" |
Adds a new
autoSelect
boolean option (default istrue
) that controls whether the first search result should be automatically selected or not. Setting it tofalse
is useful when using token-less autocompletion for a search input (user can enter an arbitrary string and ignore the autocomplete).