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
When modifying an input's value via its ref (i.e. how react-hook-form passes updates to components when the imperative setValue function is used), the input doesn't respond to the change.
I guess that RHF does something like ref.current.value = "new value", so I have also provided an example in the StackBlitz project.
Without digging into the internals of the NextUI component, I'm guessing it creates a controlled input, making it incompatible with an uncontrolled form library.
NextUI Version
2.3.6
Describe the bug
When modifying an input's value via its
ref
(i.e. howreact-hook-form
passes updates to components when the imperativesetValue
function is used), the input doesn't respond to the change.I guess that RHF does something like
ref.current.value = "new value"
, so I have also provided an example in the StackBlitz project.Without digging into the internals of the NextUI component, I'm guessing it creates a controlled input, making it incompatible with an uncontrolled form library.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-vnrckd?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
I expect the value of the input to change to track the form state.
Screenshots or Videos
No response
Operating System Version
Linux
Browser
Chrome
The text was updated successfully, but these errors were encountered: