[Vuejs]-VueJS: Chrome devtools doesn't instantly update an array (in parent component). Why?

0👍

In this line of code, this.selectedUsers[idx] = event.target.value, I’m directly setting the value of an Array which vue is not able to pickup these direct modification to the array.

Excerpt from the below linked page

When you modify an Array by directly setting an index (e.g. arr[0] = val) or modifying its length property. Similarly, Vue.js cannot pickup these changes.

More info VueJS common gotchas – why DOM isn’t updating

Leave a comment