I am facing an issue with this v-for
loop:
<tr v-for="(product, index) in products" v-bind:key="products.id">
<div v-on:click="decrementQtd(index)" class="action-qtd-button-left">
<strong>-</strong>
</div>
<div class="div-input-qtd">
<input v-model="product.quantity" class="input-qtd-cart" type="text">
</div>
</tr>
In my script section, I have the following method:
methods: {
decrementQtd: function (index) {
this.products[index].quantity--
}
Even though console.log(quantity)
shows that the quantity is decrementing correctly, the value in interpolation is not updating. How can I resolve this issue?