I am using Infinite Scroll from Metafizzy on a page which consists of images and are filtered using dropdowns. The JS for Infinite Scrolls is the following. The infinite scrolling works as expected
if (document.querySelector('.pagination__next')) {
let infScroll = new InfiniteScroll('.article-feed', {
path: '.pagination__next',
append: '.article',
hideNav: '.pagination'
});
}
By default, after clicking on any of these filters I get the following queryparams in my URL:
?sort=date&collection=&bids=&search=
However as I continue to scroll down and the next page is loaded, my queryparams change to the following:
?page=1&sort=date
How can i ensure the same queryparams are shown, and only the page is changed? The only time I want the queryparams to change is when the user interacts with the filters mentioned.