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
Describe the bug
When using defaultValues with a field having a setValueAs function defined, setValueAs is called twice, causing the form to fail dispatching a proper value if the return of setValueAs is not a valid input for the field.
Open the console, you'll see that "nullableDate" has been called twice using defaultValues. Once with a string, a second time with a Date object. Causing the default value to not be displayed inside the input field of type "date" (which expect a value like: "2021-01-01")
Uncomment the code from line: 25-31, reload the page.
setValueAs has been called once with a string as input as expected.
Describe the bug
When using defaultValues with a field having a
setValueAs
function defined,setValueAs
is called twice, causing the form to fail dispatching a proper value if the return of setValueAs is not a valid input for the field.To Reproduce
setValueAs
has been called once with a string as input as expected.Codesandbox link (Required)
https://codesandbox.io/s/wandering-moon-hry9x?file=/src/App.js
The text was updated successfully, but these errors were encountered: