Skip to content
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

Problem with input type "checkbox" when is checked by default #102

Open
Giosk opened this issue Sep 17, 2019 · 1 comment
Open

Problem with input type "checkbox" when is checked by default #102

Giosk opened this issue Sep 17, 2019 · 1 comment
Labels

Comments

@Giosk
Copy link

Giosk commented Sep 17, 2019

When I try to render a simple HTML piece of code like this <input type="checkbox" id="chk4" checked/>, the library throws this warning Failed prop type: 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 .
I tried then to change the HTML to <input type="checkbox" id="chk4" defaultChecked/> but I was sure it would not work and as you can see the lib has throwed Invalid DOM property defaultchecked. Did you mean defaultChecked?.
I found a solution, but it's necessary to change the file "camel-case-attribute-names.js" adding to "NON_STANDARD_ATTRIBUTES" the value "defaultChecked".
Could you please make this change to the library?

Thanks
Regards
Giorgio

@aknuds1
Copy link
Owner

aknuds1 commented Sep 17, 2019

Can you please submit a PR with the fix you made? That would speed up the process of getting this fixed.

@aknuds1 aknuds1 added the bug label Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants