-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Checkbox plugin #80
Checkbox plugin #80
Conversation
c638435
to
7e53f43
Compare
326d768
to
e71a671
Compare
@@ -1,6 +1,3 @@ | |||
{ | |||
"extends": "ta-webapp", | |||
"env": { | |||
"node": true | |||
} |
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.
Cruft, this is handled by the ta-webapp config now.
return ( | ||
<Checkbox defaultChecked label='This checkbox comes prechecked' /> | ||
); | ||
}; |
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.
To check a checkbox, just set the React defaultChecked
prop. This works because props are spread where they should be.
|
||
const checkboxProps = _.clone(this.props); | ||
delete checkboxProps.className; | ||
const props = getUnhandledProps(this); |
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 hadn't seen this utility before! NEATO!
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.
This is a newer util. Gets all props not defined in propTypes nor defaultProps.
🍂 |
This PR sets precedence for how we deal with Semantic UI jQuery plugins.
Fixes #72