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 (vue-instantsearch): isLastPage has wrong value after loading previous items #6213

Open
1 task done
oliverbeck-dev opened this issue May 22, 2024 · 0 comments
Labels
triage Issues to be categorized by the team

Comments

@oliverbeck-dev
Copy link

oliverbeck-dev commented May 22, 2024

🐛 Current behavior

I use infiniteHits with show-previous=true. if hit "load more", the next 30 items get loaded and the url has &page=2. overall there are around 100 items and per page I set 30. If I then reload the page, It shows all items correctly. I see all items from page 2. at the bottom I still see the button "load more" and at the top I see a button "load previous". If I click "load more", it loads the previous 30 items correctly, but the "load more" button disappears. that shouldn't happen since there are around 35 pages

🔍 Steps to reproduce

  1. use infiniteHits with more than 2 pages
  2. activate showPrevious
  3. load the second page
  4. reload the page
  5. load the previous ones
  6. you should still see the load more button but you probably won't

sorry for not providing a codesandbox live example, but the vue instantsearch templates seems broken, I can't start a working environment with that

Live reproduction

https://codesandbox.io

💭 Expected behavior

with the infiniteHits widget I would expect, that when I have more that 2 pages and load the page with ?page=2 argument and then load the previous ones (from page 1), I should still see the button "load more"

Package version

instantsearch.js 4.69, vue-instantsearch 4.17

Operating system

No response

Browser

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@oliverbeck-dev oliverbeck-dev added the triage Issues to be categorized by the team label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues to be categorized by the team
Projects
None yet
Development

No branches or pull requests

1 participant