Skip to content

Commit

Permalink
Use innerRef prop instead of ref to avoid warning
Browse files Browse the repository at this point in the history
Fixes #2181
  • Loading branch information
meriadec committed Mar 5, 2018
1 parent c9d0273 commit 9262af9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Creatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class CreatableSelect extends React.Component {

render () {
const {
ref: refProp,
innerRef: refProp,
...restProps
} = this.props;

Expand Down Expand Up @@ -258,6 +258,8 @@ CreatableSelect.propTypes = {
// See Select.propTypes.filterOptions
filterOptions: PropTypes.any,

innerRef: PropTypes.func,

// Searches for any matching option within the set of options.
// This function prevents duplicate options from being created.
// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
Expand Down Expand Up @@ -290,8 +292,6 @@ CreatableSelect.propTypes = {
// (filterText: string): string
promptTextCreator: PropTypes.func,

ref: PropTypes.func,

// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
shouldKeyDownEventCreateNewOption: PropTypes.func,
};
Expand Down

0 comments on commit 9262af9

Please sign in to comment.