Skip to content Skip to sidebar Skip to footer

Impossible To Update V-model With Inputs

I generate objects in answers like this: ...which gives the following output when

Solution 1:

As @skirlte stated, there are change detection caveats.

Due to limitations in JavaScript, Vue cannot detect the following changes to an array:

When you directly set an item with the index, e.g. vm.items[indexOfItem] = newValue. When you modify the length of the array, e.g. vm.items.length = newLength. So change this lined of code:

this.answers[question.id] = question.answer.answer

to

this.$set(this.answers, question.id, question.answer.answer)

Post a Comment for "Impossible To Update V-model With Inputs"