Skip to content

Commit

Permalink
Merge pull request #8 from jasonchangxo/fix/open-on-enter
Browse files Browse the repository at this point in the history
Added open on enter functionality
  • Loading branch information
jasonchangxo authored Oct 4, 2017
2 parents 7bbe89b + ff6dead commit 2c206c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,11 @@ var Select = function (_React$Component) {
return;
case 13:
// enter
if (!this.state.isOpen) return;
if (!this.state.isOpen) {
this.focusNextOption();
return;
}
// if (!this.state.isOpen) return; //commented out to open on ENTER keydown
event.stopPropagation();
this.selectFocusedOption();
break;
Expand Down

0 comments on commit 2c206c8

Please sign in to comment.