Best for async default values from different parts of form #12392
Unanswered
gajraj-gan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I have a form which has lot of parts. It is a very big form, and each part fetches thing from different part of our backend. Right now our data flow is doing a setValue, and when user clicks on save changes -- save everthing. I want to add a functionality to check if the form is dirty or not when user clicks on back button.
To do this, I need to reset the default values, now this is where the problem lies. We have around 16 hooks doing "setValue" in the form. Now I can do a reset there, but I think these reset will cause a weird edge case since you have the reset the entire form and not individual parts. What is the best way to reset these different parts of form?
Beta Was this translation helpful? Give feedback.
All reactions