Replies: 1 comment 5 replies
-
Also have such cases, maybe a little bit different. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At this moment the only way to reset form is to call
reset(defaultValues)
. It would be nice to have a option to just unlock/clear cache, i.e. forces to re-render and pick defaultValue from each field component again.Now I have to call
getValues()
to get registered field names and then set new default value to those not dirty, despite the fact that field components have new data available, but it ignores defaultValue attribute.Worth to say: it shouldn't reset dirty fields. Only those untouched as renderedValue === defaultValue.
Beta Was this translation helpful? Give feedback.
All reactions