Skip to content

Commit e90b9e5

Browse files
committed
fix: dont actually need ref
1 parent 6a3449a commit e90b9e5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/components/PaginatedTable/useVirtualizedTbodies.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ export const useVirtualizedTbodies = <T, F>({
4444
onDataFetched,
4545
keepCache = true,
4646
}: UseVirtualizedTbodiesProps<T, F>) => {
47-
// Reusable spacer tbody elements (max 2: before and after active chunks)
48-
const beforeSpacerRef = React.useRef<HTMLTableSectionElement>(null);
49-
const afterSpacerRef = React.useRef<HTMLTableSectionElement>(null);
50-
5147
const renderChunks = React.useCallback(() => {
5248
const chunks: React.ReactElement[] = [];
5349

@@ -62,7 +58,6 @@ export const useVirtualizedTbodies = <T, F>({
6258
chunks.push(
6359
<tbody
6460
key="spacer-start"
65-
ref={beforeSpacerRef}
6661
style={{
6762
height: `${startEmptyCount * chunkSize * rowHeight}px`,
6863
display: 'block',
@@ -124,7 +119,6 @@ export const useVirtualizedTbodies = <T, F>({
124119
chunks.push(
125120
<tbody
126121
key="spacer-end"
127-
ref={afterSpacerRef}
128122
style={{
129123
height: `${endEmptyCount * chunkSize * rowHeight}px`,
130124
display: 'block',

0 commit comments

Comments
 (0)