Skip to content

Commit

Permalink
Added open on enter functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonchangxo committed Oct 4, 2017
1 parent 259e97a commit ff6dead
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 ff6dead

Please sign in to comment.