Skip to content
New issue

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

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

No column props render as class="col-...-infinity"?! #7153

Open
TsgabiXD opened this issue May 31, 2023 · 0 comments
Open

No column props render as class="col-...-infinity"?! #7153

TsgabiXD opened this issue May 31, 2023 · 0 comments

Comments

@TsgabiXD
Copy link

TsgabiXD commented May 31, 2023

No properties render to col-sm-infinity and col-lg-infinity-class

I'm not sure if this is a bug, but I can't find the error in my code so it has to be something framework specific...
...or I missed something in the docs °~°

Everything was normal until I added this part of code:

<b-col
  :cols="colWidth < 6 ? 6 : colWidth"
  :sm="colWidth < 3 ? 3 : colWidth"
  :lg="colWidth < 2 ? 2 : colWidth"
>
</b-col>

Template

<b-row>
  <b-col></b-col>
</b-row>
<b-row>
  <b-col></b-col>
  <b-col></b-col>
</b-row>
<b-row>
  <b-col
    v-for="img of images.slice(1)"
    :key="img.id"
    :cols="colWidth < 6 ? 6 : colWidth"
    :sm="colWidth < 3 ? 3 : colWidth"
    :lg="colWidth < 2 ? 2 : colWidth"
  >
  </b-col>
  <b-col
    :cols="colWidth < 6 ? 6 : colWidth"
    :sm="colWidth < 3 ? 3 : colWidth"
    :lg="colWidth < 2 ? 2 : colWidth"
  >
  </b-col>
</b-row>

HTML

<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col-sm-infinity col-lg-infinity"></div>
</div>
<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col-sm-infinity col-md-6 col-lg-4"></div>
  <div data-v-250f83ad class="col-sm-infinity col-lg-infinity"></div>
</div>
<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
</div>

Expected behavior

HTML

<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col"></div>
</div>
<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col-md-6 col-lg-4"></div>
  <div data-v-250f83ad class="col"></div>
</div>
<div data-v-250f83ad class="row">
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
  <div data-v-250f83ad class="col-sm-3 col-lg-2 col-6"></div>
</div>

Versions

Libraries:

  • BootstrapVue: ^2.23.1
  • Bootstrap: ^4.6.2
  • Vue: ^2.7.14

Environment:

  • OS: Win10
  • Browser: MS Edge
  • Version: Chrome 113

For now I fixed it like this:

<b-col sm lg></b-col>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant