metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.42k stars 1.74k forks source link

How to push different history URL while keeping infinite-scroll auto incremenet/decrement? #951

Open SHxKM opened 3 years ago

SHxKM commented 3 years ago

I have a page albums, which calls an internal url api-albums using VueJS (axios). This is also the URL that infinite-scroll is instructed to use.

api-albums returns a JSON response, which I then parse.

My problem is that infinite-scroll is currently replacing my URL with:

https://mywebsite.com/api-albums?page=2

Instead of the desired:

https://mywebsite.com/albums?page=1

It is also not adjusting the state back when I scroll back up.

How can I instruct infinite-scroll to pull data from api-albums but push history with albums?

abant07 commented 10 months ago

Is this still a problem? I can try to help out.