1👍
✅
There are multiple problems
-
In your examples you don’t show how you initialize your
data()
but assuming from the codethis.markedSteps = [];
ininitializeMarkedSteps
I think you have nomarkedSteps
indata()
. That’s problem number 1. Properties in data are only reactive if they existed when the instance was created (addmarkedSteps: []
intodata()
) -
Due to limitations in JavaScript, Vue cannot detect changes to an array when you directly set an item with the index – use
Vue.set(this.markedSteps, i, true)
instead
Source:stackexchange.com