Open gloriaJun opened 5 years ago
In my case, I can't use defaultChecked
, because I'm trying to change the value of the checkbox with the help of another button click function...!:neutral_face:, I try checked
instead of defaultChecked
then it works properly. but the console is shown the message
Warning: You provided a 'checked' prop to a form field without an 'onChange' handler. This will render a read-only field. If the field should be mutable use 'defaultChecked'. Otherwise, set either 'onChange' or 'readOnly
Test Scenario
Error Log
Solution
onChange
instead ofonClick
readOnly
defaultChecked
instead ofchecked
Reference