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

fix: re-bind actionCreators to changed props.form #4492

Conversation

opichals
Copy link
Contributor

@opichals opichals commented Jun 19, 2019

The mapDispatchToProps was only called once as it was returning a () => computedActions cached function. But in order to reflect a form property updates when one re-uses the decorated reduxForm()(DetailComponent) instance the bindings must be re-bound to the changed form prop value.

@codecov
Copy link

codecov bot commented Jun 19, 2019

Codecov Report

Merging #4492 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #4492   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          74      74           
  Lines        1744    1743    -1     
======================================
- Hits         1744    1743    -1
Impacted Files Coverage Δ
src/createReduxForm.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f40c80...bd145f7. Read the comment docs.

@opichals opichals force-pushed the ensure-actionCreator-is-re-bound-to-props-form-on-props-change branch from d1e1a41 to 48c2e53 Compare June 19, 2019 12:43
@opichals opichals force-pushed the ensure-actionCreator-is-re-bound-to-props-form-on-props-change branch from 48c2e53 to bd145f7 Compare June 21, 2019 08:58
@opichals
Copy link
Contributor Author

Updated with a test for the change.

@renatoagds renatoagds self-requested a review June 24, 2019 13:40
@renatoagds renatoagds merged commit a6c82d8 into redux-form:master Jun 25, 2019
@lock
Copy link

lock bot commented Jul 25, 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 Jul 25, 2019
@renatoagds
Copy link
Contributor

renatoagds commented Jul 26, 2019

Published in v8.2.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants