Skip to content

Commit 14f4aa3

Browse files
committed
[Bug]: Duplicate events shown in the UI #3399
1 parent 926926b commit 14f4aa3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

frontend/src/hooks/useInfiniteScroll.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export const useInfiniteScroll = <DataItem, Args extends InfinityListArgs>({
8585
console.log(e);
8686
}
8787

88-
isLoadingRef.current = false;
88+
setTimeout(() => {
89+
isLoadingRef.current = false;
90+
}, 10);
8991
};
9092

9193
useLayoutEffect(() => {
@@ -108,6 +110,7 @@ export const useInfiniteScroll = <DataItem, Args extends InfinityListArgs>({
108110
const scrollPositionFromBottom = element.scrollHeight - (element.clientHeight + element.scrollTop);
109111

110112
if (scrollPositionFromBottom < SCROLL_POSITION_GAP) {
113+
console.log('test', element.scrollHeight);
111114
getMore().catch(console.log);
112115
}
113116
}, [disabledMore, getMore]);

0 commit comments

Comments
 (0)