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

Dont delete initial initialValues structure on withCleanUp #3619

Merged

Conversation

ms88privat
Copy link
Contributor

@ms88privat ms88privat commented Nov 17, 2017

possibly fixes #2597 #3366

@erikras What's your opinion here?

I will create an additional test to catch this case for the future.

Edit: Let me try to restructure it. I don't like to have this logic inside a util function.

Edit2: The second commit did restructure the implementation. deleteInWithCleanUp now takes an optional shouldDelete function, where you can specify when to delete and when not.

Edit3: Added a test to the BLUR reducer, if you like it, I can add it also to the CHANGE and CLEAR_FIELDS reducer.

@ms88privat ms88privat changed the title Dont delete initialValues structure on withCleanUp Dont delete initial initialValues structure on withCleanUp Nov 17, 2017
@ms88privat ms88privat force-pushed the dont-delete-parent-if-initialised branch from e7ad08a to e32110e Compare November 17, 2017 12:07
@ms88privat ms88privat force-pushed the dont-delete-parent-if-initialised branch from e32110e to 2b26dfe Compare November 17, 2017 12:07
@codecov-io
Copy link

codecov-io commented Nov 17, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3619   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          70      70           
  Lines        1558    1562    +4     
======================================
+ Hits         1558    1562    +4
Impacted Files Coverage Δ
src/deleteInWithCleanUp.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 df718b8...401ef00. Read the comment docs.

@ms88privat ms88privat force-pushed the dont-delete-parent-if-initialised branch from f3da938 to c8aa688 Compare November 17, 2017 12:33
@ms88privat
Copy link
Contributor Author

@erikras Any opinion on that one?

@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.

Impossible to clear last field in a form when initialValues is an empty object and the form was submitted
3 participants