-
-
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
Change to initialValues causes user input to be lost #832
Comments
|
We had a pretty long discussion about this on #370. |
I'm having the same issue with v5.1.1 -- if the Will this issue be addressed in v6.0.0? |
If the past is anything to go by, there will soon be complaining that they were depending on the value overwriting. 😃 I do, however, agree with you guys that it should not overwrite the current form values when Fix published as |
Thank you! |
Thanks a lot! |
Using 5.1.3 and My form is displayed along with the list and it is expected that all user values are overwritten when new item is selected from the list. There should be a better communication about such breaking changes. At least the old behavior should be the default not the new. 5.1.1 is working as expected |
@kromit I apologize for that. 😞 People clearly have different expectations about this. |
Is there a way to allow an overwrite only for fields that have a different initial value from the previous initialValues? Currently, if a user is editing a large form and just one initialValue is changed, it seems the entire form re-renders and the user loses whatever new inputs they entered, all for that one value. |
@EddyBorja I believe this is the behavior with the |
@kpdecker I tried it, and it seems like the initialValues are never changed from what they were the first time they are set. In my scenario, my initialValues actually start off as blank strings, because my container needs to fetch data from the DB to populate the initialValues. Once the data comes in, it sets the initial values for the form based off the data it gets back. However, by setting This is within a Meteor app. |
Published |
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. |
If the initialValues object changes, non-conflicting user changes will be lost as the entire form is reset. While the correct behavior for the conflicting field case is a bit ambiguous, it seems like we should not invalidate user input in the event this changed.
The text was updated successfully, but these errors were encountered: