Infinitehits show-previous: when loading page=x, load all results up to and including that page

We are using the infinitehits widget, and have enabled the “show-previous” modifier to enable the “page=x” query parameter, which allows us to load directly to a page in the results.

Default behaviour is that it only loads that specific page of results. Is there a way to load all results up to and including that page?

i.e. say a page size of 10, We want /collections/mycollection?page=4 to load results 0-40, rather than only results 31-40.

Thanks in advance!

Hi! I don’t think this feature is supported by instantsearch, indeed.
To confirm this, I found this old issue about this exact missing feature, not resolved: infinite hits: should we load the previous pages · Issue #85 · algolia/react-instantsearch · GitHub

Hi, nice find, admittedly that post is 4 years old so perhaps things would have changed since then, but maybe not. Thanks!

1 Like