Closed JavierM42 closed 2 years ago
That would be an improvement indeed, but I am not sure when I can get to it. In the mean time, debouncing it should work as a workaround.
:tada: This issue has been resolved in version 2.8.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug The atBottomStateChange callback fires at least twice when the Virtuoso component mounts.
Reproduction https://stackblitz.com/edit/react-opcwka?file=src/App.js
To Reproduce Check the console and see the three logs on every reload:
false
, thentrue
, thenfalse
again.If you set
initialTopMostItemIndex=999999
,atBottomStateChange
will fire a fourth time with valuetrue
.If there are not enough elements to introduce a scrollbar, it will fire only two times (first
false
, thentrue
).Expected behavior
atBottomStateChange
only fires once on mount, with the correct value.Screenshots
Desktop (please complete the following information):