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 field not validating after re-mount (#3566, #3500) #3909

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

viljark
Copy link
Contributor

@viljark viljark commented Mar 13, 2018

Because we do

return (
    !structure.deepEqual(values, nextProps && nextProps.values) ||
    !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys)
  )

in the defaultShouldValidate, we have to remove the field keys from the lastFieldValidatorKeys when Field is destroyed, otherwise on re-mount the key still exists and validation is skipped.

Should fix:
#3500
#3566

@codecov-io
Copy link

codecov-io commented Mar 13, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3909   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          70      70           
  Lines        1629    1631    +2     
======================================
+ Hits         1629    1631    +2
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 085b218...c33440d. Read the comment docs.

@asaarnak
Copy link
Contributor

Hei @erikras @gustavohenke!
Could take a look at this PR please?
Quite important for us.

@lock
Copy link

lock bot commented Jun 1, 2018

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 Jun 1, 2018
@erikras
Copy link
Member

erikras commented Jun 12, 2018

Released in v7.4.0.

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

4 participants