Alien attributes are not passed to the checkbox element in b-form-checkbox-group
See original GitHub issueYou cannot pass alien attributes to the checkbox element within a b-form-checkbox-group component. The following component definition applies the ‘class’ attribute to the ‘group’ div and not the underlying checkbox inputs. This may or may or may not be by design but there is no way of passing attributes to the input elements.
To reproduce the problem, define a checkbox group thus:
<b-form-checkbox-group class="success" v-model="selectedItems" :options="items"></b-form-checkbox-group>
I would have expected any alien attributes, class in this instance, to be applied to the checkbox elements. These are, after all, the elements that are visible and have a user impact.
Versions
Libraries:
- BootstrapVue: 2.#.#
- Bootstrap: 4.#.#
- Vue: 2.#.#
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Zend Form: Checkbox element displays as hidden field?
I found, when i send _POST to the server, that las row isn't sent corectly - default zeros from hidden are sent, instead...
Read more ><input type="checkbox"> - HTML: HyperText Markup Language
A Boolean attribute indicating whether this checkbox is checked by default (when the page loads). It does not indicate whether this checkbox is ......
Read more >Checkbox Example (Two State) | APG | WAI - W3C
Indicates the checkbox is not checked. CSS attribute selectors (e.g. [aria-checked="false"] ) are used to synchronize the visual states with the ...
Read more >Form Checkbox | Components - BootstrapVue
Custom checkbox input and checkbox group to replace the browser default checkbox input, built on top of semantic and accessible markup.
Read more >HTML DOM Input Checkbox value Property - W3Schools
For checkboxes, the contents of the value property do not appear in the user interface. The value property only has meaning when submitting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, I give up.
That is what scoped styles and deep selectors are for. I still can’t understand why people are so scared of writing deep selector styles, or an extra line (or two) of HTML/Vue markup.
Re
button-variant
… it is a special use case that translates a theme color names to a class… i.e.danger
is translated to classbtn-danger
(and in some components there is extra logic to determine the class prefix based on other conditions). It is not the same as a propbutton-class