Skip to content

Allow native checkboxes #53

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Closed
karaxuna opened this issue Sep 29, 2017 · 1 comment
Closed

Allow native checkboxes #53

karaxuna opened this issue Sep 29, 2017 · 1 comment
Milestone

Comments

@karaxuna
Copy link
Contributor

No description provided.

@jakezatecky
Copy link
Owner

Native checkboxes are actually used to handle the firing of DOM events, but they are just hidden from the user and the Font Awesome version is visible instead. Another user actually noticed two checkboxes because of this fact, likely because his/her CSS was out of date.

It is important to note that native checkboxes do not have a "partial" (or "indeterminate") check state that can be specified in HTML. It can programmatically be set in JavaScript, but that would involve componentDidMount/componentDidUpdate invocations that would touch DOM elements, which is not the React way of doing things, unless someone can tell me otherwise:

https://css-tricks.com/indeterminate-checkboxes/

A less important thing to note is that the visual unity of the component would diminish, particularly on some platforms, because the native checkboxes do not have the same visual theme as the other icons. Of course, that is a decision for the developer to make, and users are more used to native checkboxes than the fake imitations I am using.

Still, I am not totally against this if a nice way to trigger indeterminate states is available for checkboxes within HTML. I would like to avoid manipulating DOM nodes if at all possible. Nevertheless, I may decide to create a separate <NativeCheckBox> component that deals with indeterminate state sometime in the future.

@jakezatecky jakezatecky added this to the v1.1.0 milestone Oct 2, 2017
jakezatecky added a commit that referenced this issue Oct 2, 2017
jakezatecky added a commit that referenced this issue Oct 2, 2017
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants