-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
To overcome the array-contain's 10 max limit, would it be possible to implement a kind of pagination?
My uses case is that I want to pre-filter the collection before doing an actual filtering. I have a 'items' collection, and each user has myFavItems. I want each user to do be able to filter the 'items' collection but only for his/her items. Example: For user A, it has 20 entries in his myFavItems. I want to go against the 'items' collection and filter by 'blue' items, but only within the scope of his 20 items.
So ideally I'd like to do something like:
const myFavItems = [ 1,2, ... 20]
const { data } = useCollection( 'items',
{
where: ['id', 'in', myFavItems ]
where: ['color', 'array-contains', myColor],
},
The problem is the first filter is limited to 10.
So, any ideas? What about to create a moving window to query for 10 items each time?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels