Having difficulty accessing the event
object in a debounced method:
methods: {
fetchData: _.debounce(function(e) {
console.log(e) // returns undefined
}, 500)
}
Is it feasible to retrieve the event object in a method? I need to determine which keycodes were pressed:
if (e.keyCode >= 65 && e.keyCode <= 80) {
// perform some actions
}
The fetchData
method is triggered as follows:
<input @keyup="fetchData()" v-model="name" type="text">