Preserving search results with useInfiniteQuery
I have an infinite endpoint which is hooked up to a form, the user can search for and select user “Steve” who is not on page 1 (without search).
The onSearch clears in my select component, and this makes the react query trigger with an empty search value, it refetches page 1, and then removes the “Steve” option.
How can I preserve that option? It works fine for normal scrolling, but not with search.
And my options passed to my form:
0 Replies