Replies: 1 comment 1 reply
-
Is this what you're looking for? const form = useForm({ ... });
const defaultValues = form.formState.defaultValues; |
Beta Was this translation helpful? Give feedback.
1 reply
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 know this has been discussed before but I haven't read a explanation why this couldn't be added. With complex controlled components, for example a rich text editor, being able to access the
defaultValues
would be really useful. Updating the value constantly from the controller back to the component can be heavy and unnecessary since the component manages its state. Updates are only needed when the value of thedefaultValues
changes (viareset
).Is there a specific reason why the value of
defaultValues
could not be exposed? Currently you can access it viacontrol._defaultValues
but obviously that's something you shouldn't do 👼Simplified example:
Beta Was this translation helpful? Give feedback.
All reactions