I am working with a basic array structure that looks like this:
dates[2]
0:"2018-01-09T15:00:00.000Z"
1:"2018-01-10T14:00:00.000Z"
My watcher is configured as follows:
data() {
return {
dates: [],
}
}
watch: {
// this function will run whenever dates changes
dates: {
handler: function(before, after) {
console.log('dates has been changed');
},
deep: true
}
},
Currently, the watcher only detects when an element is added or removed from the array, not when the value (time) changes.
Is there a way to achieve the desired behavior?