My solution was very simple (see v-model="tags[index]"
):
Instead of doing this:
<template v-for="tag in tags">
<TagView :key="tag.key" v-model="tag" />
</template>
You should do this:
<template v-for="(tag, index) in tags">
<TagView :key="tag.key" v-model="tags[index]" />
</template>
The reason is you cannot pass iterated object tag
into v-model
for modifications. Please find more info about this: Iterating a list of objects with foreach