Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite-hits - show previous pages results #2750

Closed
piuskamil opened this issue Feb 26, 2018 · 7 comments
Closed

infinite-hits - show previous pages results #2750

piuskamil opened this issue Feb 26, 2018 · 7 comments
Labels
Feedback Automatically sends feedback to the Product team (do not rename) Scope: Widgets Type: Feature

Comments

@piuskamil
Copy link

My initial page params: ?q=&idx=items&p=2
it shows me only results from page 2 and i can not show result form page 1 and page 0.
I dont want to use pagination. Im only using infinite-hits with show more button.

There is a way to show results from p0 to p2 ?

@bobylito
Copy link
Contributor

Hi @kamilo81
So far, we've advised users with infinite hits UI to not synchronize the page with the URL. For now, we haven't changed our point of view. We might want to reconsider that but we have no plan yet.

@piuskamil
Copy link
Author

Ok I dont expect ready solution but maybe can u give me some advice / workaround how can I make that?

@bobylito
Copy link
Contributor

The infinite hits works by keeping the previous pages internally. Since you can't access these internal, the easiest would be to have a look at the implementation and create a new widget based on your requirements.

@bobylito
Copy link
Contributor

@kamilo81 have you been able to do something here?

@bobylito bobylito added Scope: Widgets Feedback Automatically sends feedback to the Product team (do not rename) Type: Feature labels Feb 28, 2018
@piuskamil
Copy link
Author

Hi. I switched to native algolia js api. It’s easier to match my needs.

@fujiii
Copy link

fujiii commented Apr 5, 2019

You can drop "page" parameter from urlSync, and use hitsPerPage (&hPP=) parameter instead, increasing it by initial hitsPerPage number.

var hitsPerPage = 12;

$('body').on('click', '.ais-infinite-hits--showmore', function () {
hitsPerPage += 12;
search.helper.setQueryParameter('hitsPerPage', hitsPerPage);
});

Doesn't really work this way.

@Haroenv
Copy link
Contributor

Haroenv commented Apr 5, 2019

Note we are working on this in #3645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Automatically sends feedback to the Product team (do not rename) Scope: Widgets Type: Feature
Projects
None yet
Development

No branches or pull requests

5 participants