You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
No description provided.
The text was updated successfully, but these errors were encountered: