Skip to content

Commit

Permalink
Fix for Creatable doesn't allow input key down handling. Issue JedWat…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Leonenko committed Sep 23, 2016
1 parent 2b14448 commit 290aa15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Creatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const Creatable = React.createClass({
},

onInputKeyDown (event) {
const { shouldKeyDownEventCreateNewOption } = this.props;
const { shouldKeyDownEventCreateNewOption, onInputKeyDown } = this.props;
const focusedOption = this.select.getFocusedOption();

if (
Expand All @@ -169,6 +169,8 @@ const Creatable = React.createClass({

// Prevent decorated Select from doing anything additional with this keyDown event
event.preventDefault();
} else if (onInputKeyDown) {
onInputKeyDown(event);
}
},

Expand Down

0 comments on commit 290aa15

Please sign in to comment.