-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
innerRef not working with withStyles #15329
Comments
You can use |
👋 Thanks for using Material-UI! We use the issue tracker exclusively for bug reports and feature requests, however, If you would like to link from here to your question on SO, it will help others find it. |
Thanks a lot for the fast answer! I can see the field on the documentation indeed... |
@joshwooding thanks for the response, but that works for inputs. What about for components like Steps in Steppers? |
@iyobo Most components if not all of them should be forwarding refs now. For every component their is a section in their API docs under their props API that confirms it e.g. https://material-ui.com/api/step/ |
Similar problem was posted on https://stackoverflow.com/questions/53227495/how-i-can-access-to-dom-node-inside-of-withstyle-component
and should have been fixed in #10106.
Expected Behavior 🤔
I'm modifying the
SignIn
example to enable signing without post. I use innerRef to pass reference and get the underlying component (Input
s objects) and I expect the reference to populatecurrent.value
properly.Current Behavior 😯
When running the app, I get
Steps to Reproduce 🕹
The callback that should access the references is
logMeIn
.This is a modification of the official example.
Context 🔦
I want the button to call the callback and set up the object to access the input fields.
Your Environment 🌎
Project created by react-create-app
The text was updated successfully, but these errors were encountered: