-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3d8f9d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not a good solution. The problem your facing is a known problem when working with bolean attributes in react, which aren‘t input elements. The value of your boolean is converted into a string for example your checked with value false is converted into a string with value „false“ which results in a true when using it as a boolean value in code, cause the html5 spec says if a attribute is present its true, it doesnt care about the value it has. If its not present as attribute its a false.
3d8f9d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at facebook/react#9230