Skip to content

Commit 0027678

Browse files
committed
fix: overscans
1 parent dbca82f commit 0027678

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/PaginatedTable/useScrollBasedChunks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ interface ChunkState {
1818
shouldFetch: boolean;
1919
}
2020

21+
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
22+
2123
// Bad performance in Safari - reduce overscan counts
22-
const DEFAULT_RENDER_OVERSCAN = 2;
24+
const DEFAULT_RENDER_OVERSCAN = isSafari ? 1 : 2;
2325
const DEFAULT_FETCH_OVERSCAN = 4;
2426

2527
export const useScrollBasedChunks = ({

0 commit comments

Comments
 (0)