When using multiple instantsearch (instantsearch with multiple indices and multiple pagination widgets), only the pagination widget tied to the searchbox widget works.
I followed this example https://jsfiddle.net/j9nwpz34/
And I built this, which is similar but only 1 pagination widget works (For readability I've simplified the jsfiddle, but I have a specific use case where the results will be shown in tabs, so I need multiple pagination widgets):
https://jsfiddle.net/flrrrhoffpauir/rrf2vbdy/
So if you search for "martin" you will see results for 2 different indices, each with pagination widgets.
Clicking "2" in the first pagination widget will scroll to the top but does not show the data for page 2 or set page 2 as the active page.
The second pagination widget works as expected.
Is this the wrong implementation or a bug?
I see that there is some investigation going on. Any update on this issue?
I've tried some things out, but didn't have anything that was a solution yet, sorry @flrrrhoffpauir
@flrrrhoffpauir
The helper contains a magic behaviour that resets the page to the first if you change any parameter. The problem comes from this behavior and because your search function in collection sets the query at every search, which will always reset the page to the first.
For the solution, I suggest trigger the search and give more control to your main search which in this case seems to be story because it has the search box.
Here is your fiddle fixed: https://jsfiddle.net/bobylito/bsjdch4m/1/
Btw if this works for you, can you also accept my answer to the stackoverflow question you opened? https://stackoverflow.com/questions/49638646/algolia-instantsearch-with-multiple-indices-and-multiple-pagination-widgets/49796164?noredirect=1#comment86826994_49796164 馃槄
Most helpful comment
@flrrrhoffpauir
The helper contains a magic behaviour that resets the page to the first if you change any parameter. The problem comes from this behavior and because your search function in
collectionsets the query at every search, which will always reset the page to the first.For the solution, I suggest trigger the search and give more control to your main search which in this case seems to be
storybecause it has the search box.Here is your fiddle fixed: https://jsfiddle.net/bobylito/bsjdch4m/1/