2👍
✅
Create a computed property which returns only the filtered results:
computed: {
filteredResults() {
return this.results.filter((result) => {
// your filter logic, something like this:
// return result.big || result.tall
});
}
}
And use it in the v-for
instead:
<div v-for="result in filteredResults">{{result.name}}</div>
Source:stackexchange.com