I'm trying get a insertion into an object at Vue, but I can't...
data: {
formValid: {},
buttonIsDisabled: true,
statusModal: 'active',
},
methods: {
closeModal() {
this.statusModal = ''
this.formValid.test = "test"
}
},
watch: {
formValid: {
handler(o, n) {
console.log(o)
console.log(n)
},
deep: true
}
}
When I do 'this.formValid.test = "test"' I don't go to Watch, but if I have this object into of the formValid and I change it, in this case, I go to Watch.
Do you know how can I get this event?