react-infinite-scroller: onLoadMore does not get called anymore

upon scroll to the end, does not trigger the onLoadMore despite hasMore=true Version 1.2.4 here is the configuration used threshold={200} initialLoad={false} loadMore={() => console.log(‘load more’)} hasMore={true} useWindow={false}

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 29
  • Comments: 18

Most upvoted comments

loadmore is not getting called!

This has been driving me nutty. I’m glad it’s not just me. Is there an ETA on this?

Nope, but I had that issue as well and I solved it by setting initialLoad={ false } and fetching the first page manually, which was a requirement for me anyway. When you do that, the library fetches the subsequent pages correctly.

I also seem to have fixed the issue discussed in this thread. For me, what works (at least for me) is adding a 10px padding at the bottom of a container div that wraps the loading component.

In my case I forgot to add height attribute to the parent <div>. Once added the issue got resolved.

I figured out the cause of this issue in my case, I was trying to use the infinite scroll functionality with useWindow={true} and the issue turned out to be caused by a parent div which had overflow: auto specified, I got rid of that and everything works now as expected! 😄