I am using the
react-instantsearch-hooks-web library to display a search UI in my Next.js app.
I am using the infinite hits in my search result. And I also enabled the automatic routing which syncs my URL with the right search parameters.
When I apply refinements and other filters, I get all the results and I can scroll to load more, let’s say to
So after that, the UI state knows I am on
page=4 and the URL has that parameter as well.
Example of URL generated:
Issue: If at that point I try to filter for something else, the results will be incomplete because it only uses the page 4.
So I’m wondering how do people usually manage that, or if I did something wrong. As a workaround, how do I remove that page parameter from the URL parameters?
Thanks a lot