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

Load more not triggered if viewport below sentry

Open tomkelsey opened this issue 3 years ago • 0 comments

Hi,

Thanks for this project - it's very good and has been a big help!

I'm using it on a page with a big footer (below the infinite list) and so if you scroll fast you can end up below the sentry and load more is not triggered. You have to scroll back up and then down again.

You can recreate it on your demo (https://onderonur.github.io/react-infinite-scroll-hook/) by decreasing the vertical height of the browser window and then scrolling quickly down so that only the footer is visible.

It may be the intended way for the hook to work but I wondered if perhaps the logic for loading more could be if the sentry is intersecting or if it's below the current viewport?

Many thanks!

tomkelsey avatar Mar 03 '22 17:03 tomkelsey