-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feat: add keepValues to initialize (closes #3649) #3817
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3817 +/- ##
======================================
Coverage 100% 100%
======================================
Files 70 70
Lines 1601 1609 +8
======================================
+ Hits 1601 1609 +8
Continue to review full report at Codecov.
|
This is a fantastic feature, and by coincidence exactly what I need right now :-) Anyone an idea on how long would it take for this be part of an official release? |
@swils happy to hear. As you also have a use case for this, would you more prefer to keep the initial values and values just with one option, or separately? Maybe like Also I guess this might take some time, regarding to other PRs. My temporarily solution (as I really need this right now) would be to fork this repo, merge this branch into master and directly add my repo as dependency in my node modules 😅 |
Not sure if I understand what you mean by the difference between |
Like my PR is about keeping the formReducer: {
myForm: {
values: {
aField: 'some value',
},
initial: {
aField: 'some initial value',
},
},
}, Current PR implementation formReducer: {
myForm: {
values: {
aField: 'some value', // <- kept
aNewField: 'new value',
},
initial: {
aField: 'some initial value', // <- kept
aNewField: 'new value',
},
},
}, Seperated options Here with the option formReducer: {
myForm: {
values: {
// any old value is lost here
aNewField: 'new value',
},
initial: {
aField: 'some initial value',
aNewField: 'new value',
},
},
}, Here with the option formReducer: {
myForm: {
values: {
aField: 'some value',
aNewField: 'new value',
},
initial: {
// any old value is lost here
aNewField: 'new value',
},
},
}, |
Published in |
Hmmm @JPeer264 no real opinion on this, I guess more options are better in this case? |
@swils ya it got merged now, so it is one option ( |
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. |
I added the feature of #3649. Now I added just an option
keepValues
, but kept the initial values with the same flag. Should another flagkeepInitial
be set for this?