I am currently trying to make the active tab change when I put a value in a variable which controls the component, but it doesn't work. I am binding a variable to v-model and then changing that variable with the value I want. The point is, wheter the value is a number or a string, it doesn't matter because the tabs won't work.
<v-card flat>
<v-tabs v-model="tab" fixed-tabs>
<v-tab v-for="(instance, idx) in tabData" :key="`${idx}`" @click="callChildrenToUpdate(idx)">
<v-badge color="red" size="18" class="p-2" v-if="instance"></v-badge>
...
</v-tab>
</v-tabs>
...
</v-card>
The data:
data () {
return {
tab: null,
items: [],
tabData: this.tabsData
}
},
And then in the mounted hook I try changing it, but it won't work.
this.tab = 87
tab
value changes using Vue Dev Tools – Nizar Zizounetab
will go from first to last following 0, 1, 2... respectively. – Nizar Zizoune