vuejs2 - VueJS Watch not working -
i trying watch particular property of component. property array gets's updated every time checkbox selected.
https://github.com/ratiw/vuetable-2/wiki/special-fields#-__checkbox
this code trying this
watch: { selectedto: function(val){ console.log(val); } },
neither did below code work
watch : { selectedto: { handler(val, oldval) { console.log('item changed'); }, deep: true } },
vue console: http://prntscr.com/gb1gew
you can watch $refs.<name>.<data>
not $refs.<name>
itself.
reference on this: https://jsfiddle.net/kenberkeley/9pn1uqam/
still, though don't know how code works, try
this.$watch(() => this.$refs.vuetable.selectedto, (val) => {...})
Comments
Post a Comment