I often run into this problem using the Vuetify v-chip-group.
I'm using the v-chip-group v-model, which is the selected chip index.
<v-chip-group
v-model="selectedItem"
>
I set the value to -1 so by default so no v-chip is selected
data() {
return {
selectedItem: -1,
}
}
The problem I encounter is when a v-chip is selected, it changes the value from its default, but when this v-chip item is deleted from the list, the selectedItem value becomes undefined.
Is there a way to put back the value to -1 in the cases where there isn't any selected chip ?