[Vuejs]-Vue v-select in bootstrap table

2👍

If I am getting your question right, then remove the class “table-responsive” from the div wrapping the table. Add it to the table instead.

<div id="app">
  <h1>Vue Select - Selecting Multiple Values</h1>
  <div>
    <table class="table table-responsive table-bordered">
      <thead>
        <tr>
          <td>col1</td>
          <td>col2</td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>
 <v-select multiple v-model="selected" :options="options"></v-select>
          </td>
          <td></td>
        </tr>
        <tr>
          <td>text</td>
          <td>text</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<script>
    Vue.component('v-select', VueSelect.VueSelect)

    new Vue({
      el: '#app',
      data: {
        selected: ['foo','bar'],
        options: ['foo','bar','baz']
      }
    })
</script>

CodePen Link

Alternatively:

<div id="app">
  <h1>Vue Select - Selecting Multiple Values</h1>
  <div class="table-responsive" style="overflow-x:visible;">
    <table class="table table-bordered">
      <thead>
        <tr>
          <td>col1</td>
          <td>col2</td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>
 <v-select multiple v-model="selected" :options="options"></v-select>
          </td>
          <td></td>
        </tr>
        <tr>
          <td>text</td>
          <td>text</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<script>
    Vue.component('v-select', VueSelect.VueSelect)

    new Vue({
      el: '#app',
      data: {
        selected: ['foo','bar'],
        options: ['foo','bar','baz']
      }
    })
</script>

Leave a comment