-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Confusion around obtaining a ref to a Button/IconButton element #10081
Comments
I have removed the ref properties form most of the components: #10025. It will be released in beta.31 this evening. |
But the ref on a |
I see the linked recommendation, but how can you recommend switching over to use that, when the use of |
This documentation section was added with #9768. Another React issue to have a look at facebook/react#11401. It's suggesting the addition of a special "hostRef" prop that only works on host components (
We can add a |
Ok, good to know about that other react issue. BTW, that one also does not recommend the use of I like the |
Alright. Let's implement it :). |
Thanks for discussion thread on the issue Would really appreciate a response, with any possible updates that have been made :) |
When reading the documentation, I find it confusing that
IconButton
(doc) is documented to have abuttonRef
and arootRef
props. What's the difference between those two? Also, whyButton
(doc) is documented to have none of those? And thenButtonBase
(doc) hasrootRef
but nobuttonRef
.Additionally, I find that in the release notes of v1.0.0-beta.27
rootRef
is being removed from some components (although I don't see any button component being mentioned there).Finally, while using these components under the latest release (beta.30) which is already after beta.27, I get buttons to work using
rootRef
, even when they don't have this prop documented. And I get icon buttons to work withbuttonRef
but not withrootRef
, even when they have both documented.So which one is it?
The text was updated successfully, but these errors were encountered: