-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Question: How to focus on a specific field after submitting? #68
Comments
Well, there's no such API, because there don't have to be any |
Well my main point is not about focusing, but it is about being able to get
a reference, though you are right that the reference would not mean
anything for non-standard componets.
I simply achieved this by creating a new input component that accepted a
prop that gets passed to the `input`'s `ref`
|
Okay, so some fields like |
Sure, definitely. In fact, that's how I solved my immediate problem. The only gotcha is you cannot name that property as On Wed, Jul 13, 2016 at 12:36 PM, Radosław Miernik <notifications@github.com
|
Okay, any idea, how to call it? How about |
Yep that's a good name, indeed!
|
I want to be able to focus on a specific field on a form after the form submit has been handled, but could not manage to get a reference to the input of a field component I want to target.
Tried to track down some API for that but could not find one, so what would be the canonical way to get a reference for an input?
The text was updated successfully, but these errors were encountered: