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

gives possibility to use ref property for Creatable #1646

Merged
merged 1 commit into from
Oct 27, 2017

Conversation

blacktemplar
Copy link
Contributor

fixes issue #1644

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 92.611% when pulling 08ed387 on blacktemplar:ref-prop-in-creatable into a0e5855 on JedWatson:master.

@gwyneplaine gwyneplaine merged commit 0431540 into JedWatson:master Oct 27, 2017
@gwyneplaine
Copy link
Collaborator

thanks for this @blacktemplar this has been merged into master.

@aaronincincy
Copy link

aaronincincy commented Jan 4, 2018

This appears to be causing warnings for me (react-select@1.1.0, react@15.6.2). I'm using ref={r=>this.selector = r} and getting:

Warning: CreatableSelect: ref is not a prop. Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)

I believe this is because ref is reserved, so you can't really pass it through like you are. If you renamed it to selectRef for Creatable (and updated the documentation for this exception to the Select API) I believe that would solve the issue.

My code seems to still work ok (it was working before upgrading from rc10), but I'd like to get rid of the warning if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants