mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 06:03:22 +00:00
requestAnimationFrame to initial inf scroll check
This commit is contained in:
parent
c2f053e769
commit
ebaec6fab6
@ -38,7 +38,9 @@ function InfiniteScroll({ children, margin = '2000px', loadMore }: Props) {
|
||||
}
|
||||
|
||||
// Check if the sentinel is within the viewport on mount
|
||||
requestAnimationFrame(() => {
|
||||
checkSentinelInViewport();
|
||||
});
|
||||
|
||||
return () => {
|
||||
if (observerRef.current) {
|
||||
|
Loading…
Reference in New Issue
Block a user