Skip to content

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

Description

@Giosk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions