Skip to content

Commit 3e6a0a0

Browse files
committed
Update ShardZonesTable
1 parent 54e4b74 commit 3e6a0a0

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

packages/compass-global-writes/src/components/shard-zones-table.tsx

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export function ShardZonesTable({
8686
}: {
8787
shardZones: ShardZoneData[];
8888
}) {
89-
const tableContainerRef = useRef<HTMLDivElement>(null);
9089
const [searchText, setSearchText] = useState<string>('');
9190
const [expanded, setExpanded] = useState<true | Record<string, boolean>>({});
9291

@@ -96,7 +95,6 @@ export function ShardZonesTable({
9695
);
9796

9897
const table = useLeafyGreenTable({
99-
containerRef: tableContainerRef,
10098
data,
10199
columns,
102100
state: {
@@ -139,12 +137,7 @@ export function ShardZonesTable({
139137
aria-label="Search for a location"
140138
placeholder="Search for a location"
141139
/>
142-
<Table
143-
className={containerStyles}
144-
title="Zone Mapping"
145-
table={table}
146-
ref={tableContainerRef}
147-
>
140+
<Table className={containerStyles} title="Zone Mapping" table={table}>
148141
<TableHead isSticky>
149142
{table
150143
.getHeaderGroups()
@@ -168,25 +161,11 @@ export function ShardZonesTable({
168161
<Row key={row.id} row={row}>
169162
{row.getVisibleCells().map((cell) => {
170163
return (
171-
<Cell key={cell.id}>
164+
<Cell key={cell.id} cell={cell}>
172165
{flexRender(cell.column.columnDef.cell, cell.getContext())}
173166
</Cell>
174167
);
175168
})}
176-
{row.subRows.map((subRow) => (
177-
<Row key={subRow.id} row={subRow}>
178-
{subRow.getVisibleCells().map((cell) => {
179-
return (
180-
<Cell key={cell.id}>
181-
{flexRender(
182-
cell.column.columnDef.cell,
183-
cell.getContext()
184-
)}
185-
</Cell>
186-
);
187-
})}
188-
</Row>
189-
))}
190169
</Row>
191170
))}
192171
</TableBody>

0 commit comments

Comments
 (0)