SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

[Help] How to use with b-tabs (bootstrap) #242

Open gabmed opened 1 year ago

gabmed commented 1 year ago

How to use vue.draggable with Bootstrap-Vue Tabs? I want to drag tabs to reorder them.

I tried the following but it does not work (tabs does not render):

<b-card no-body>
     <b-tabs card @drop="droped">
            <draggable
                  v-model="tabs"
                  group="people"
                  @start="drag=true"
                  @end="drag=false"
                  item-key="id">
                <template #item="{element, index}">
                  <b-tab :title="element.title">{{element.text}} -{{index}}</b-tab>
                </template>
              </draggable>
       </b-tabs>
</b-card>

I think that´s because of b-tabs template, not sure. Thanks