react-infinite-scroller icon indicating copy to clipboard operation
react-infinite-scroller copied to clipboard

Loadmore function immediately called (or never called) when using a custom parent ref.

Open paul23-git opened this issue 5 years ago • 11 comments

Describe the bug As per title, if not using a direct parent as the scroll target the whole library misbehaves. In my personal project the code will not, ever, call the loadmore function. If I use the sandbox version it will call the loadmore function constantly.

To Reproduce https://codesandbox.io/s/react-infinite-scroller-reproducible-sandbox-5j7m4

Expected behavior Only call loadmore if scrolling to the end in the scroll target.

Device (please complete the following information):

  • Browser: chrome 76.0.3809.132 (Official Build) (64-bit)
  • OS: ubuntu

paul23-git avatar Sep 17 '19 18:09 paul23-git

facing the same issue here too

abhishekmg avatar Sep 30 '19 12:09 abhishekmg

Same here, it would be good to have better documentation. The loadMore function gets called repeatedly even if the user is not scrolling. I think it defeats the purpose of infinite scrolling.

sebasalvarado avatar Sep 30 '19 18:09 sebasalvarado

facing same issue

dvlpr-shivendra avatar Oct 11 '19 15:10 dvlpr-shivendra

same issue, chrome work error but on mobile work correctly

As3ass1n avatar Oct 15 '19 05:10 As3ass1n

same issue, is this project inactive?

michael-38 avatar Dec 11 '19 18:12 michael-38

same here, any update?

evie9z avatar May 13 '20 00:05 evie9z

Same issue. The loadMore function is being immediately called for the first time without even scrolling.

akkisagiraju avatar Jun 17 '20 06:06 akkisagiraju

Same issue. The loadMore function is being immediately called for the first time without even scrolling.

@akkisagiraju There is a initialLoad prop to avoid triggering loadingMore immediately.

<InfiniteScroll
   initialLoad={false}
   loadMore={this.handleInfiniteOnLoad}
   ...        

zhiyuc123 avatar Jul 03 '20 05:07 zhiyuc123

Same here! Any update?

JamieL1989 avatar Dec 05 '20 23:12 JamieL1989

any update on this?

MatinF avatar Apr 05 '21 18:04 MatinF

@zhiyuc123 thanks bro you saved me

sufyankhatri avatar Sep 24 '21 11:09 sufyankhatri