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
issue: In the specified sandbox environment, when the onChange event handler is invoked with undefined as its argument, the Component does not receive the updated value. However, despite this, the form data is successfully updated.
#1042
Closed
1 task done
manishjatiwal opened this issue
Jan 17, 2024
· 4 comments
Just open the sandbox, and click on the buttons.
The first component uses undefined as the argument to onChange, and hence is not working as expected.
The second component used empty string as as the argument to onChange, and works beautifully.
Expected behaviour
After setting the value as undefined by calling the onChange(undefined), ComponentOne should get the update value i.e, undefined, instead of default value.
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Version Number
7.49.3
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/rhf-bug-mfygck?file=%2Fsrc%2FApp.js
Steps to reproduce
Just open the sandbox, and click on the buttons.
The first component uses
undefined
as the argument toonChange
, and hence is not working as expected.The second component used empty string as as the argument to
onChange
, and works beautifully.Expected behaviour
After setting the value as
undefined
by calling theonChange(undefined)
, ComponentOne should get the update value i.e, undefined, instead of default value.What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: