-
-
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
initialize()
action creator should update initialValues
props
#3459
Comments
Yes. |
I wasn't suggesting that this be "automatic" via 2-way data binding. Redux form components get a bunch of props passed into them. I thought it might be possible to recompute the initialValues prop from the |
I'm running into lot's of issues with |
I am conflicted about this. On one hand, it's a little strange to me if On the other, after doing some investigation, maybe this is the correct behavior, as I've found a bug associated with validation logic when In
The last condition is the important one; if we pass an Notably, this means that the The workaround I'm trying right now is to not pass If this is not the way @erikras would also appreciate a look at this. |
@timhwang21 I doubt people very often do both things (pass an So I think at the very least, if Maybe it should even warn or error if the |
It appears that the
initialValues
prop that is provided to the form only comes from whateverinitialValues
prop you pass into the form, as opposed to staying in sync with theinitial
property of the form in the redux state tree. Therefore, using theinitialize()
action creator and keeping theinitialValues
prop in sync requires grabbing theinitial
property from redux inmapStateToProps
and passing that in to your form component. Perhaps there is no way around this 2-step process, but I expected the use ofinitialize()
to accomplish this for me (and therefore expected theinitial
property in redux to always be the same as theinitialValues
prop available to form components).The text was updated successfully, but these errors were encountered: