Instantsearch.js: `connectInfiniteHits` doesn't support routing

Created on 20 Nov 2018  ·  3Comments  ·  Source: algolia/instantsearch.js

Describe the bug 🐛

connectInfiniteHits doesn't implement getWidgetState() and getWidgetSearchParameters() to support routing (introduced in #2829).

As a result, it's not possible to retrieve the page number for the router on the hits (except when having another widget mounted, such as pagination).

To Reproduce 🔍

Steps to reproduce the behavior:

  1. Go to this sandbox
  2. Scroll down to "Show more results"
  3. Click on "Show more results"
  4. Notice that the URL doesn't change (the page doesn't appear)
  5. Uncomment the pagination widget line 39
  6. Reiterate steps 2-3
  7. The URL does update with the page number

Expected behavior 💭

The page number should be accessible without the pagination widget.

Environment:

  • InstantSearch.js ≤ 2.10.4
Connectors Bug

All 3 comments

I don't think the connectHits connector is a concern for this issue since it doesn't let the user refine the page. Only the connectInfiniteHits connector have this feature. Did I miss something?

Indeed, I edited the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devwax picture devwax  ·  3Comments

zeke picture zeke  ·  3Comments

bobylito picture bobylito  ·  3Comments

proudlygeek picture proudlygeek  ·  4Comments

jvreeken picture jvreeken  ·  3Comments