[Vuejs]-Vuetify tabs removing tab does not remove nested component

4👍

That is because you are using "index" as key for the tabs:

    <v-tab v-for="(t, index) in tabs" :key="index" :href="'#tab-' + index">
    

You need to use something more unique. I’d suggest, in your example, to use the tab’s title:

    <v-tab v-for="(t, index) in tabs" :key="t.title" :href="'#tab-' + index">
    

You need to change also the line that creates the actual content:

        <v-tab-item
          transition="fade-transition"
          reverse-transition="fade-transition"
          v-for="(t, index) in tabs"
          :key="t.title"
          :value="'tab-' + index"
        >

Leave a comment