6👍
✅
You need computed properties. Basically like:
computed: {
filteredThings: function () {
return this.things.filter(function(thing){
return thing.indexOf(this.searchQuery) > -1;
}.bind(this));
}
}
demo: http://jsfiddle.net/dewey92/Lr9r2kfv/2/
I have also answered this type of question in Vue.js empty filter results
Source:stackexchange.com