-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
reset to "latest" initialValues #561
Comments
Fixed this issue by setting targetUser to null when a userId is selected then load selected user object in a following action. |
This seems to be my problem as well. I'm not using a form plugin. |
Nevermind, my problem was that when I was resetting the form I was calling:
Rather than passing the form name:
|
Yes. #370 (comment) |
The "workaround" if anyone is wondering, is to use |
To reset form from outside of ReduxForm component:
To reset form inside ReduxForm component: |
I'm not sure why but setting the enableReinitialize=true doesn't work on my case. However, manually triggering the reset on the form does. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
After updating initialValues and then resetting the form, the the form resets back to the original initialValues and not the latest initialValues. Is this the intended behavior?
When a new user is selected, I'm using the form plugin to return undefined
and loading initial values through mapStateToProps.
Both resetForm() and destroyForm()+initializeForm(targetUser) reset the user info to the first user that was selected, instead of the most recent. Is there a better way to do this?
The text was updated successfully, but these errors were encountered: