Skip to content
Discussion options

You must be logged in to vote

I guess this is the reason why filtering is done in the backend usually 😅 .

What you can do is call fetchNextPage() in the event handler that does the filtering if the items aren’t enough. But there’s no guarantee that the next page has any items matching those filters, so you might have to do this more than once ?

If you want to instead trigger a backend filter if the frontend filter yields no data, just set some state with those filters and add them to the queryKey.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NicoleRauch
Comment options

Answer selected by NicoleRauch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants