[added] Allow Tab to select option
Adds the ability to press Tab to select the currently highlighted option. This is consistent with most other autocompletion components (see https://jedwatson.github.io/react-select/, http://react-autosuggest.js.org/, https://harvesthq.github.io/chosen/, https://jqueryui.com/autocomplete/, http://easyautocomplete.com/, etc). I've added a prop to enable this, and have enabled it by default. This is mainly so it can be disabled just in case there's any issues.
Also adds a new selectionMethod argument to onSelect that specifies the method used to select the option. This will be one of click (if the item was selected with the mouse), Enter, or Tab. This allows the user to handle tab differently to enter.
Closes #182
When will this be added to the package?
Any updates on this?
I'd love to have this added :)
@CMTegner @Daniel15 Can't wait to get my hands on this feature. :smirk:
If you want to get this before it's merged, you can use my fork:
"react-autocomplete": "Daniel15/react-autocomplete#fb812e2dd01b7b30be4da6380912cf5ffa24a9f8",
I've been using this on a live site since November 2016 and haven't had any issues with it.
@CMTegner Any chance of getting this in? I'm happy to rebase it.
This, what I would call, vital piece of functionality needs to be merged. This PR is over 2 years old. Is this library in maintenance mode??? I hope not with 40k+ downloads a week.