vue-at
vue-at copied to clipboard
BUG? @at event called 2 times
There is a bug when @at event is being called 2 times on every new character. <at-ta at="#" :allowSpaces="false" :members="members" @at="handleAt">
@gmatkowski ahh.. let me have a look. Btw, which browser and version are you using?
Chrome 66.0.3359.181, vue-at @ 2.5.0-beta
green line i incorrect, not the same time.
@gmatkowski oh i'm sorry the bug does exist!
Hope you can fix it :-)
Created a quickfix for my own app until this has been fixed:
data() {
return {
atSearch: '',
}
}
...
handleAt: function(chunk) {
// See https://github.com/fritx/vue-at/issues/65
if (this.atSearch === chunk) {
return;
}
this.atSearch = chunk;
...
},
This still calls handleAt
twice, but prevents it from doing more logic in the actual method.