So i'm working with you and I have a select component, I created a modelValue prop which is an empty string, and passed it in v-model:
<select v-model="modelValue" @change="changeOption">
<option
disabled
value="">
Choose from the list
</option>
<option
v-for="option in options"
:key="option.value"
:value="option.value">
{{ option.name }}
</option>
</select>
props:{
modelValue:{
type: String
},
options:{
type: Array,
default: () => []
}
}
But for some reason it gives an error: Unexpected mutation of "modelValue" prop. I just started working with Vue so I'm not sure where this error could come from. I was following a tutorial and everything seemed to work there.