petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.13k stars 299 forks source link

EndReached is not called when the height of the container is greater than the total height of the loaded items #1059

Open PedroJBrito opened 5 months ago

PedroJBrito commented 5 months ago

Describe the bug This is a reproduction of a problem we're facing in our current project. For screens with a large resolution, we are running into situations where the height of the container is greater than the total height of the items loaded, which causes endReached not to be called, even though the totalCount is greater than the items currently loaded. Do you have any ideas on how I can overcome this problem? Thank you very much for your help.

Reproduction https://codesandbox.io/p/sandbox/thirsty-agnesi-5mdtc7?file=%2Fsrc%2FApp.js%3A22%2C28

To Reproduce I used your example for infinite scroll and just changed the pageSize to 3. The first endReached is called but it doesn't happen anymore and even if I use atBottomStateChange it doesn't work either.

Expected behavior The expected behavior would be for endReached or any other event to be called until the totalHeight of the container is matched if the totalCounts is greater than the currently loaded items.

AayushKarki714 commented 3 months ago

I am facing the same Issue.