0π
β
It is because Vue.js is not picking on changes when you mutate directly in the array.
Instead use Vue.set
.
Change your callback:
<button @click="addSeat(index)">Add</button>
And then add this method:
addSeat(index) {
this.$set(this.nbrSeats, index, this.nbrSeats[index] + 1);
}
Source:stackexchange.com