0👍
Both map
and filter
being used is redundant, specially since map
is being used as filter
and filter
is not really doing anything.
What about this:
this.matches = this.options.filter(function(o) {
return o[that.displayProp].toLowerCase().indexOf(lowSearch) > -1
})
That said, I don’t see why this would cause a performance impact, but it’s really the only issue I see (I’d have written this as a comment if I could).
- [Vuejs]-How to show data in Vue tab in devtools?
- [Vuejs]-How to fix Vue error `[Vue warn]: data functions should return an object`?
Source:stackexchange.com