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 proposal: clear
action creator
#3055
Comments
Seems sensible to me, I'd say go for it! |
Note as well the linked issue^.. maybe there are other cases for having bulk setting of formValues. |
Hm, I just saw the issue, so maybe a |
|
Consider also #2224 |
@danielrob So I'm running into an issue in the implementation of a bulk change action, and was hoping one of the maintainers could chime in... (cc @erikras) The issue: the function signature for actions that change multiple fields is However, internally the Any sort of bulk change action can't have Not supplying these arguments at all would make the bulk change action behave subtly different from the change action. Bug reports galore 😱 The bulk change action could simply dispatch an array of change actions, which replicates how users are currently using Thanks! |
clears fields values by a given array Issue: redux-form#3055, Issue: redux-form#2224
clears fields values by a given array Issue: redux-form#3055, Issue: redux-form#2224
@erikras Do you have any ETA on when this feature will be released in a stable version? |
Fix published in |
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. |
Are you submitting a bug report or a feature request?
Feature request
A common pattern I'm running into for dependent fields (e.g. field B's value depends on field A having a value) is that I want to clear field B when field A changes.
So I do something like:
change
doesn't support passing in multiple fields currently. In my case, I know that the value for each changed field will benull
, so an action creatorclear()
(or some better name) with the same signature asuntouch()
would be very useful:Alternative / additional suggestion: Change the argument order of
change
to(form:string, value:any, ...fields:string)
, to bulk change values. The downside is that similar action creators will need to be changed to be consistent with the signature.Is there a better existing way that I'm missing? If not, would there be interest in this functionality? If so I can take a crack at it over the weekend. Thanks!
The text was updated successfully, but these errors were encountered: