You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see from #3744 that the preferred way to set form values from an API call is via resetForm, not by giving initialValues a reactive object and modifying that.
When populating with values from an API, should { force: true} always be used? The docs for resetForm say that resetForm merges by default?
By default resetForm merges the previous initial values with the new one provided, meaning only the provided ones will be overwritten. You can overwrite all the fields by passing force: true in the second argument.
Given this does it make sense to use force when updating from an API unless you are explicitly trying to merge values?
Just wanted to make sure I'm understanding the intended pattern of use here. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I see from #3744 that the preferred way to set form values from an API call is via
resetForm
, not by givinginitialValues
a reactive object and modifying that.When populating with values from an API, should
{ force: true}
always be used? The docs for resetForm say thatresetForm
merges by default?Given this does it make sense to use
force
when updating from an API unless you are explicitly trying to merge values?Just wanted to make sure I'm understanding the intended pattern of use here. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions