Skip to content
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

Feature Request: initialize new fields and preserve older values #3649

Closed
JPeer264 opened this issue Nov 30, 2017 · 3 comments
Closed

Feature Request: initialize new fields and preserve older values #3649

JPeer264 opened this issue Nov 30, 2017 · 3 comments
Labels
enhancement improvements in current API

Comments

@JPeer264
Copy link
Contributor

JPeer264 commented Nov 30, 2017

Feature Request

What is the current behavior?

When I dispatch the ActionCreator initialize('myForm', { myField: 'Init Value' }). It will initialize all values as expected. But will also wipe all previous initial values and all values from the store within the form.

What is the expected behavior?

The expected behavior is fine, as it is useful in many use cases. The only thing I wish is a ActionCreator, which allows to initialize another field in a already registered form, e.g. initializeField(form, field, value, ...). This will just initialize one field at a time and keep other initial values.

Another thing what I can imagine is another option in the ActionCreator initialize to preserve older already initialized values, e.g.: keepValues or preserveValues.

What's your environment?

Redux-Form: v7.2.0

@pmarshall111
Copy link

Seconded, it would be great to be able to keep dirty fields when using initialize.

There is enableReinitialize and keepDirtyOnReinitialize as reduxForm config params, but from my attempts they (appear to) have no affect on the behaviour of initialize().

@erikras
Copy link
Member

erikras commented Mar 2, 2018

Published fix in v7.3.0.

@erikras erikras closed this as completed Mar 2, 2018
@lock
Copy link

lock bot commented Mar 2, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement improvements in current API
Projects
None yet
Development

No branches or pull requests

4 participants