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

ScrollableTarget issue

Open Septillioner opened this issue 5 years ago • 4 comments

When scrollableTarget's scrollHeight equals to scrollableTarget's clientHeight that means scroll disabled. 'next' props function is not triggering. This causes more data not to be fetched from the server.

Septillioner avatar Oct 22 '20 12:10 Septillioner

Hi @Septillioner I think I have fixed an error close to this one. Can you post an example, I don't fully understand your issues.

Justin2997 avatar Oct 22 '20 16:10 Justin2997

I have a container named #wrapper. #wrapper doesn't have a scrollbar when not overflowed because "overflow-y:auto". and we have a server to get rows of data(props next). We have a InfiniteScroll component that has a ScrollableTarget is #wrapper. The problem is when #wrapper is not overflowed on big resolutions(4K or 8K etc.) InfiniteScroll does not call the function props "next" when hasMore props true. I tried to set "overflow-y: scroll" then didn't work because scrollHeight equals to clientHeight. I think function props "next" have to call when hasMore props true and clientHeight equals to scrollHeight (that means scrollableTarget is not overflowed). And sorry I couldn't give example because. I don't have time to create an example.

Septillioner avatar Nov 03 '20 09:11 Septillioner

I do not clearly remember my fix, but I have this problem. I think I change the library.

Justin2997 avatar Nov 10 '20 16:11 Justin2997

workaround

TheDevCactus avatar May 03 '21 16:05 TheDevCactus