-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defaultChecked not working #13
Comments
Hi @seyade , The If you wish to check a single |
Thanks @AlexLisenkov for replying. And great work by the way! I think |
Thank you for pointing out this issue, I believe there is something wrong with a Checkbox being controlled or not. The misunderstanding, or flaw, is that the checked prop is now behaving like a defaultChecked. I agree with you, and the defaultChecked should be allowed and set the initial checked state. If we add the defaultChecked there we will be left with the choice about what we should do with the checked prop.
Going for option 2 will be nice in a way that it will behave like a checkbox as how we're used to it. But it will also void the main feature of this package, easily add a checkbox to check all. Can you give your opinion? |
I guess, the most viable option will be to leave as it is since |
Hi Team
I'm trying to apply
defaultChecked
toCheckbox
but it's not working. I get a warning saying:Warning: ForwardRef contains an input of type checkbox with both checked and defaultChecked props...
, etc.How can I apply
defaultChecked
especially for pre-populating checkboxes?Many Thanks
The text was updated successfully, but these errors were encountered: