Skip to content

Commit

Permalink
Merge pull request #1646 from blacktemplar/ref-prop-in-creatable
Browse files Browse the repository at this point in the history
gives possibility to use ref property for Creatable
  • Loading branch information
gwyneplaine authored Oct 27, 2017
2 parents 7b184a2 + 08ed387 commit 0431540
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 @@ -156,6 +156,7 @@ class CreatableSelect extends React.Component {
const {
newOptionCreator,
shouldKeyDownEventCreateNewOption,
ref: refProp,
...restProps
} = this.props;

Expand Down Expand Up @@ -183,6 +184,9 @@ class CreatableSelect extends React.Component {
this.labelKey = ref.props.labelKey;
this.valueKey = ref.props.valueKey;
}
if (refProp) {
refProp(ref);
}
}
};

Expand Down

0 comments on commit 0431540

Please sign in to comment.