react-autocomplete icon indicating copy to clipboard operation
react-autocomplete copied to clipboard

[added] Allow Tab to select option

Open Daniel15 opened this issue 9 years ago • 6 comments

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

Daniel15 avatar Nov 28 '16 02:11 Daniel15

When will this be added to the package?

oxynad avatar Mar 14 '17 14:03 oxynad

Any updates on this?

dzenzes avatar Mar 22 '17 07:03 dzenzes

I'd love to have this added :)

eivindw avatar Mar 30 '17 10:03 eivindw

@CMTegner @Daniel15 Can't wait to get my hands on this feature. :smirk:

stevensona avatar Aug 31 '17 16:08 stevensona

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.

Daniel15 avatar Aug 31 '17 17:08 Daniel15

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.

mellis481 avatar Jan 21 '19 16:01 mellis481