RFC: InfiniteHits should load previous pages
See original GitHub issueWhen reloading a page with urlSync and page > 0, the infinite hits doesn’t load the previous hence it doesn’t reproduce the exact same state. We decided to close https://github.com/algolia/instantsearch.js/issues/2750 but we’ve had other users asking for it.
Proposed API
const widget = instantsearch.widgets.infiniteHits({
container: string|HTMLElement,
templates: [InfiniteHitsTemplates],
showMoreLabel: [string],
transformData: [InfiniteHitsTransforms],
cssClasses: [InfiniteHitsCSSClasses],
escapeHits: [boolean],
+ loadPreviousPagesOnReload: [boolean=false]
}: InfiniteHitsWidgetOptions);
Behaviour
The widget is not aware of the nature of the rendering. Therefore it should check at each rendering if the current page matches the cache of results. If it doesn’t it should reload the missing pages. Cool side effect of that, is that it could handle the changes of hits per page.
Raise your voice 😉
Because we might have a lot of pages, we should probably add anchors, and go directly to the current page?
The name is long but explicit 🤔
Please comment if you see a better name or you see any other issue.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Infinitehits show-previous: when loading page=x, load all ...
We are using the infinitehits widget, and have enabled the “show-previous” modifier to enable the “page=x” query parameter, which allows us ...
Read more >instantsearch.js - UNPKG
n * This object should probably not be instantiated outside of the helper. ... n * This option allows you to avoid doing...
Read more >Untitled
Gare harry potter poudlard, Melanie safka peace will come tekst, ... Yonover chicago, Bannockburn rfc pitchero, Aion beritra's phantom wings.
Read more >react-instantsearch-dom @ 5.4.0 .. 5.6.0 - Package Diff
dist/cjs/components/InfiniteHits.js ... + loadPrevious: 'Load previous', ... The ScrollTo component will make the page scroll to the component wrapped by it ...
Read more >Full text of "Your Sinclair Magazine Issue 18" - Internet Archive
Thit m«ani thot not only will you § al tw*htf* worm and froofly [BSUAi of 1^ ... otwl yog'f« Ksvifig loading probbmj, lh#re...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Met with @sashaprok and she helped us define the problem and a plan
There is not one problem but 2:
Based on that we have two proposals:
Next steps:
We’re going to test both and see what works best.
On Tue, Mar 27, 2018 at 4:53 PM, Marie-Laure Thuret < notifications@github.com> wrote:
–
https://www.algolia.com/
Alexandra (Sasha) Prokhorova
Product Designer
07 69 75 89 79 <07+69+75+89+79> https://www.linkedin.com/in/alexandraprokhorova
https://www.algolia.com/