I need to use v-for with v-model. I read the docs and there is no example of how to use it with v-for without performing mutation outside the mutation handler.
How can I use v-model inside v-for without mutating the property directly?
<div v-for="product in products">
<select @change="addItem(product)" v-model="product.quantity">
<option value="">0</option>
<option v-for="n in 10">{{n}}</option>
</select>
</div>
// component
methods : {
...mapMutations({
addToCart: ADD_TO_CART
})
},