infinite-scroll icon indicating copy to clipboard operation
infinite-scroll copied to clipboard

Next link not found on last page error

Open pastuh opened this issue 7 years ago • 3 comments

While i use infinity scroll, i want to see Page number. page=1 , page=2 and so on..

Thats why i removed history option:

  $grid.infiniteScroll({
            path: '.pagination__next',
            append: '.blog_item',
            prefill: false,
            loadOnScroll: false,
            button: '.load_more',
            outlayer: iso,
            status: '.scroller-status',
            hideNav: '.pagination',
            /*history: true,*/
  });

But if i refresh last page, i get error: Bad InfiniteScroll path option. Next link not found: .pagination__next

How i can remove this error? Thanks

pastuh avatar Oct 11 '17 18:10 pastuh

This error is working as intended. It is there to help users who set path to an element selector, but are missing the element on their page. The bad side effect is that it appears on last page.

Add a 👍 reaction to this issue if you would like to this edge case resolved. Do not add +1 comments — They will be deleted.

desandro avatar Oct 11 '17 19:10 desandro

But if i get this error, pagination numbers appear. And button: .load_more is visible even im on last page.

Anyway.. thanks for information.

pastuh avatar Oct 12 '17 15:10 pastuh

Sorry.. found bug in my own code. Thanks for help.

pastuh avatar Oct 14 '17 13:10 pastuh