Skip to content

Commit

Permalink
gives possibility to use ref property for Creatable
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktemplar committed Apr 4, 2017
1 parent a0e5855 commit 08ed387
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Creatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ const Creatable = React.createClass({
const {
newOptionCreator,
shouldKeyDownEventCreateNewOption,
ref: refProp,
...restProps
} = this.props;

Expand Down Expand Up @@ -238,6 +239,9 @@ const Creatable = React.createClass({
this.labelKey = ref.props.labelKey;
this.valueKey = ref.props.valueKey;
}
if (refProp) {
refProp(ref);
}
}
};

Expand Down

0 comments on commit 08ed387

Please sign in to comment.