0👍
✅
You don’t need to do either. You can use the filter
property to determine the algorithm you want to use to return results:
The filtering algorithm used when searching. example
That lets you control how to search.
You can also control what is supplied back to the list by modifying the collection that is used for the :items
property:
get items() {
if (this.red && this.blue && this.shoe.hasOne() {
return myCoolCollection.filter((item) => item.red && item.blue && item.shoe.count() === this.shoe.hasOne()
}
return myCoolCollection
}
Source:stackexchange.com