Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use innerRef prop instead of ref to avoid warning #2416

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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