React Hook Form Reset Triggering on Change?
I have a form using useform, one of the inputs updates another input when it is filled out using onchange and setvalue, however that second input is set to the first inputs value when I update default values using reset, and not setting the field to it's value returned in an API call. Any ideas on how to allow for setting a value on change and pulling correct data when reseting the form?
3 Replies
plz include some code
if possible, a simpler example that still produces the undesirable behavior
Will try,
Figured it out, sorry couldn't post the code, didn't have a chance to gut my stuff and reproduce the issue.
I beleive RHF avoids rerenders when changing inputs. If an input depends on rerendering I believe that should use the
watch
method for that input