diff --git a/apps/client/src/features/base/components/grid/grid-container.tsx b/apps/client/src/features/base/components/grid/grid-container.tsx index 78d45fe5..41e716c0 100644 --- a/apps/client/src/features/base/components/grid/grid-container.tsx +++ b/apps/client/src/features/base/components/grid/grid-container.tsx @@ -60,13 +60,6 @@ export function GridContainer({ onFetchNextPage, }: GridContainerProps) { const scrollRef = useRef(null); - // Records the `rows.length` at which we last triggered a page fetch. - // The trigger effect re-runs on every render (its `virtualItems` dep - // has a new identity each call) and can't rely on `isFetchingNextPage` - // alone: once a page commits, `isFetchingNextPage` flips to false for - // one render, the "near bottom" condition still holds because the - // virtualizer anchors on the old scroll position, and we'd fire again. - // Gating on `rows.length` guarantees at most one fire per new page. const lastTriggeredRowsLenRef = useRef(0); const rows = table.getRowModel().rows; diff --git a/apps/client/src/features/base/styles/grid.module.css b/apps/client/src/features/base/styles/grid.module.css index ffdb99b3..0bd21150 100644 --- a/apps/client/src/features/base/styles/grid.module.css +++ b/apps/client/src/features/base/styles/grid.module.css @@ -1,6 +1,7 @@ .gridWrapper { position: relative; overflow: auto; + overflow-anchor: none; flex: 1; min-height: 0; padding-left: 6px;