Replies: 2 comments 5 replies
-
"validation function" - you're talking about the custom |
Beta Was this translation helpful? Give feedback.
5 replies
-
Hi, looks like with actual version 7.52.0 and react 18 issue is still exist. Here is the same sandbox @Moshyfawn posted, with actual versions of react, react-dom and react-hook-form. On the first submit I got |
Beta Was this translation helpful? Give feedback.
0 replies
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 looking for the right way to update the form field value after the validation function successfully validated the original input. In my particular case I take a user input and want to validate it against a database which, if the validation query was successfully, will return both the field value together with an ID. Now I would like to replace the original field input value with the returned object. But I cannot get this to work. So far I tried by adding a setValue command just before I return true. But this does not seem to update the returned form "data" in time before the submit function is called. When I log the getValues output I see the field data is updated as expected. But the submit function data attribute will still throw the old value for the field in question. I am out of ideas how else to approach this...
Beta Was this translation helpful? Give feedback.
All reactions