Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
spacecat opened this issue · 1 comments
spacecat commented
Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/react-easy-edit-sandbox-2y97j
- Click on "Click to edit" under "Textbox"
- Enter any character in the textbox
- Check the console where you will see the error Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
Expected behavior
I expect the component to not throw an error when typing inside the textbox.
Desktop (please complete the following information):
- OS: MacOS Ventura 13.0.1
- Browser: Chrome Version 108.0.5359.124 (Official Build) (arm64)
- Version 108
giorgosart commented
duplicate of #104