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
Are you submitting a bug report or a feature request?
Bug Report
What is the current behavior?
I have a field, a. Depending on the value of a, another field, b, appears. Additionally, when changing a, we need to change the value of b as well (either setting it or clearing it out). It's possible to get the value of b to read one thing, even though its value in the form state is something else. When you focus field b it snaps to that other value, seemingly indicating that it didn't rerender after its value changed (?)
What is the expected behavior?
<OnChange /> should work the same as the useEffect hook I commented out in the file. if you use that instead of <OnChange />, it works as I'd expect: the data in the form values should match the data reflected in the form field itself.
Are you submitting a bug report or a feature request?
Bug Report
What is the current behavior?
I have a field,
a
. Depending on the value ofa
, another field,b
, appears. Additionally, when changinga
, we need to change the value ofb
as well (either setting it or clearing it out). It's possible to get the value ofb
to read one thing, even though its value in the form state is something else. When you focus fieldb
it snaps to that other value, seemingly indicating that it didn't rerender after its value changed (?)What is the expected behavior?
<OnChange />
should work the same as theuseEffect
hook I commented out in the file. if you use that instead of<OnChange />
, it works as I'd expect: the data in the form values should match the data reflected in the form field itself.Sandbox Link
https://codesandbox.io/s/ecstatic-kare-2jcts?file=/target.js
What's your environment?
See sandbox: newest everything
The text was updated successfully, but these errors were encountered: