vuetify
vuetify copied to clipboard
fix(groups): use suspense to delay rendering of group items
fixes #15207
Probably need the same for #15202 - collect all the items before rendering anything
An alternative would be to keep values instead of ids, and do a deepEqual on demand like in v2. That wouldn't help with #15202 though because layout items all depend on each other.
<template>
<v-app>
<v-container>
<v-card>
<v-btn-toggle v-model="selected" multiple variant="outlined">
<v-btn v-for="server in items" :key="server">
Server {{ server }}
</v-btn>
</v-btn-toggle>
<br>
You select: {{ selected }}
</v-card>
<v-card>
<v-tabs>
<v-tab>One</v-tab>
<v-tab>Two</v-tab>
<v-tab>Three</v-tab>
</v-tabs>
</v-card>
<v-item-group>
<v-item>
<div>a</div>
<div>b</div>
</v-item>
</v-item-group>
</v-container>
</v-app>
</template>
<script setup>
import { computed, ref, watch } from 'vue'
const items = [0, 1, 2]
const selected = ref([...items])
</script>