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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -