Getting previous state from field.value #12265
Unanswered
kyusungpark
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am working with react hook form with shadcn. I have a weird problem where I get previous state when I move across different forms.
If I pass in field.value into the Inputbox (default value is null) and move around my form, the previous value persist in the Input box. But the form state correctly shows the value it should be. I had to use
form.getValues(userAnswerPath)
to correctly show the value I want into the form. Any ideas how I can keep usingfield.value
to display the correct value?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions