reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

[added] `selectOnTab` prop #327

Open stern-shawn opened 6 years ago

stern-shawn commented 6 years ago

Basically a 1:1 port of the existing PR #186 but based on the more recent ES6-ish codebase, with the selectOnTab prop optional and defaulted to false, and without the extra selectionMethod argument to the onSelect method. Big props to @Daniel15 for having already tackled this problem.

I would love to use the vanilla react-autocomplete but the existing selectOnBlur behavior is just not acceptable for my deliverables. Selecting explicitly on Click/Enter/Tab is more expected by my users than any blur event.