Skip to content

Commit

Permalink
Merge pull request #450 from davidpene/master
Browse files Browse the repository at this point in the history
simplifying handleKey function
  • Loading branch information
JedWatson committed Sep 17, 2015
2 parents 38a3a45 + d851b8c commit 902093f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,13 @@ var Select = React.createClass({
},

handleKeyDown: function(event) {
event.preventDefault();
if (this.props.disabled) return;
switch (event.keyCode) {
case 8: // backspace
if (!this.state.inputValue && this.props.backspaceRemoves) {
this.popValue();
}
return;
break;
case 9: // tab
if (event.shiftKey || !this.state.isOpen || !this.state.focusedOption) {
return;
Expand Down

0 comments on commit 902093f

Please sign in to comment.