fix(label): add disabled class when form-check-inline and disabled#159
Conversation
Adds the disabled class when the label has both the inline and check props. This is the way bootstrap disables inline radio and checkboxes since there is no wrapping element.
|
Nice work getting that other issue into the alpha v4 release. lgtm! |
| tag: Tag, | ||
| check, | ||
| inline, | ||
| disabled, |
There was a problem hiding this comment.
should disabled be passed into the rendered component? I don't think so in this context, but it's usually something that would get passed through in something like an input.
There was a problem hiding this comment.
merging this as is, just curious about that
There was a problem hiding this comment.
For this use case, the disabled class is needed on the label. You'd end up passing it to both the label and the Input (the input uses it for the attribute). Most of the time, the label does not wrap the Input. When not inline, you pass disabled to the FormGroup and the Input.
The validation library I create does these thing for the developer using contexts.
|
published in 3.3.1 💫 |
Adds the disabled class when the label has both the inline and
check props. This is the way bootstrap disables inline radio
and checkboxes since there is no wrapping element.
I must have missed this use-case before when creating the forms and labels. The whole form-check classes are new to bootstrap 4.
Note: there is currently an open issue with bootstrap (twbs/bootstrap#20799) to correct the color of the disabled label's text (and to clarify how to denote disabled inline radio/checkboxes in the docs as it is not there, I had to infer it from the styles)