[Vuejs]-How to alterate state in array object at v-for loop?

2👍

Vue 2 can’t detect changes to existing items in an array when made the usual way; here’s the full explanation. You’ll need to change this line:

this.venta[busqueda] = newObj

to:

this.venta.splice(busqueda, 1, newObj)

(You can also use Vue.set, but splice is at least still a standard array operation.)

Leave a comment