question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alien attributes are not passed to the checkbox element in b-form-checkbox-group

See original GitHub issue

You 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:closed
  • Created 4 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ianefcommented, Oct 30, 2019

OK, I give up.

0reactions
tmorehousecommented, Oct 30, 2019

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 class btn-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 prop button-class

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found