Here's the issue:
props: {
delay: Number,
}
Watching for changes:
watch: {
q: _.debounce(function() {
console.log(this.delay); // 500; always works fine, this.delay is here
}, this.delay) // never works;
},
If I manually input a delay of 500
instead of using this.delay
, it works perfectly. Otherwise, the function does not debounce as expected.
Can someone help me identify what I'm doing incorrectly? Appreciate any insights you can provide. Thank you.