-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[IconMenu] Removed props.ref call #3913
Conversation
This is the relevant note: https://fb.me/react-special-props |
Thanks, @mbrookes, I meant to add that link, too, but forgot. Should I look at removing the calls to |
Sorry for not waiting very long for a response, but #3918 was such a simple change I went ahead and did it. |
Contributes to #3642. |
@jakeboone02 quick Q: Would this break any functionality where We obviously need to get this compatible with react 15, I just want to be aware of anything that we're breaking so we can decide what to do about it. |
I did a little more testing and from what I can tell, the feature never worked in the first place. If you pass
logs this Object:
With the new code in place, passing
I suppose you could document it now that it works, but I don't think you need to include it in the list of breaking changes in 0.15.0. |
@jakeboone02 thanks 👍 |
@mbrookes another one needed for react 15 |
In that case, I don't think that we should expose an API to change the |
Yeah, I was thinking about that this morning and I agree. The only reason the |
@jakeboone02 if you're around, can you squash? |
Sure. Never done a squash before so cross your fingers. ;) |
Calls to props.ref will throw a warning in React v15. This commit hard-codes the value instead of reading props.ref. The iconButtonRef element has been removed from the state object, since it never changes after the component is initialized. React warnings discussed in this PR: facebook/react#5744
@jakeboone02 funnily enough I just got this error while booting up with react 15 😄 https://dl.dropboxusercontent.com/s/jypgxsv48cemif2/2016-04-11%20at%207.04%20PM.png |
Calls to props.ref will throw a warning in React v15.
This commit adds a prop to IconMenu called
iconButtonRef
that, ifprovided, will be passed down to the child IconButton element as its ref.
The iconButtonRef element has been removed from the state object, since it
never changes after the component is initialized.
The new React warnings are discussed in this PR:
facebook/react#5744