Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: correct operations count
  • Loading branch information
astandrik committed Jul 2, 2025
commit bbcd3268aabd0e9de3f9851a0b461642e0d7b660
8 changes: 7 additions & 1 deletion src/containers/Operations/useOperationsInfiniteQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ export function useOperationsInfiniteQuery({
// Check after data updates
React.useLayoutEffect(() => {
if (!isFetchingNextPage) {
checkAndLoadMorePages();
// RAF to ensure browser has completed layout and paint
const raf = requestAnimationFrame(() => {
checkAndLoadMorePages();
});
return () => cancelAnimationFrame(raf);
}

return undefined;
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The explicit return undefined; at the end of the effect is redundant, as React effects without a cleanup implicitly return undefined. You can remove it to simplify the code.

Suggested change
return undefined;

Copilot uses AI. Check for mistakes.
}, [data, isFetchingNextPage, checkAndLoadMorePages]);

// Scroll handler for infinite scrolling
Expand Down
Loading