[Vuejs]-How to access Vue Instance from within an argument function?

1👍

you using arrow function which losing context.
do it with normal anonymous function

watch: {
    searchInput : "checkSearchString"
}

methods: {
    checkSearchString: _.debounce( function(value) {
         console.log("watcher firing for search!");
         console.log(value);
        this.$emit("search", value);
    }, 2000)
},

Leave a comment