You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the FormSpy component to watch the submitSucceeded event. If this event occurs, I do this.props.form.reset(). The form's values are updated, and then the first invalid field gets into focus.
Check out the API for form.initalize which is what I think you will want instead. The nice thing about that is that it will keep your submitSucceeded state so in my case, a success alert message, doesn't disappear.
Hello! I'm
What is the current behavior?
I use the FormSpy component to watch the
submitSucceeded
event. If this event occurs, I dothis.props.form.reset()
. The form's values are updated, and then the first invalid field gets into focus.What is the expected behavior?
No focus on reset.
Sandbox Link
Example
What's your environment?
The text was updated successfully, but these errors were encountered: