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
I'm trying to set the value of a Material UI TextField based on the value of another Textfield with react-hook-form.
Everything works fine so far but when set via setValue() the textfield shows placeholder and input value simultaneously (see sandbox 1)
When I use react-hook-form Controller and some custom validation, it gets quirky:
the values in the Textfields are displayed correctly but the values that get validated are always behind by one character (see sandbox 2)
Expected behavior
sandbox 1: only the text should be shown in the textfield (no Placeholder)
sandbox 2: the validation value should reflect the input value
Desktop (please complete the following information):
OS: Win 10
Browser Opera ,Chrome
Version: Opera 68.0, Chrome: 81.0.4044.129
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to set the value of a Material UI TextField based on the value of another Textfield with react-hook-form.
Everything works fine so far but when set via setValue() the textfield shows placeholder and input value simultaneously (see sandbox 1)
When I use react-hook-form Controller and some custom validation, it gets quirky:
the values in the Textfields are displayed correctly but the values that get validated are always behind by one character (see sandbox 2)
To Reproduce
see sandbox links
Codesandbox link (Required)
sandbox 1:
https://codesandbox.io/s/set-remote-input-jufwx?file=/demo.js
sandbox 2:
https://codesandbox.io/s/setremoteinputcontroller-40777?file=/demo.js
Expected behavior
sandbox 1: only the text should be shown in the textfield (no Placeholder)
sandbox 2: the validation value should reflect the input value
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: