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

Checkbox plugin #80

Merged
merged 11 commits into from
Oct 26, 2015
Merged

Checkbox plugin #80

merged 11 commits into from
Oct 26, 2015

Conversation

levithomason
Copy link
Member

This PR sets precedence for how we deal with Semantic UI jQuery plugins.

Fixes #72

@levithomason levithomason force-pushed the feature/checkbox-plugin branch 4 times, most recently from c638435 to 7e53f43 Compare October 23, 2015 16:53
@levithomason levithomason force-pushed the feature/checkbox-plugin branch from 326d768 to e71a671 Compare October 23, 2015 19:30
@@ -1,6 +1,3 @@
{
"extends": "ta-webapp",
"env": {
"node": true
}
Copy link
Member Author

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' />
);
};
Copy link
Member Author

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);
Copy link
Contributor

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!

Copy link
Member Author

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.

@eanplatter
Copy link
Contributor

🍂

levithomason added a commit that referenced this pull request Oct 26, 2015
@levithomason levithomason merged commit 3c44170 into master Oct 26, 2015
@levithomason levithomason deleted the feature/checkbox-plugin branch October 26, 2015 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants