Closed david-hov closed 8 months ago
The default value is set on mount. That's a limitation of react-hook-form. If you need this feature, I suggest you open an issue on their repository. Otherwise, use a useWatch
to update the current value (not the default) based on other values.
What you were expecting: if component inside SimpleForm updated change children defaultValues
What happened instead: Keeps the first defaultValue
Related code:
https://codesandbox.io/p/devbox/fast-sun-33rf9w?file=%2Fsrc%2Ftags%2FTagCreate.tsx%3A25%2C20
Environment