Skip to content

Commit 7e7ba56

Browse files
committed
Use more performant extended row model
1 parent e25e5b6 commit 7e7ba56

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/compass-components/src/components/leafygreen.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
TableBody,
5050
flexRender,
5151
useLeafyGreenTable,
52+
getExpandedRowModel,
5253
getFilteredRowModel,
5354
} from '@leafygreen-ui/table';
5455
import type { Row as LgTableRowType } from '@tanstack/table-core'; // TODO(COMPASS-8437): import from LG
@@ -169,6 +170,7 @@ export {
169170
InfoSprinkle,
170171
flexRender,
171172
useLeafyGreenTable,
173+
getExpandedRowModel,
172174
getFilteredRowModel,
173175
type LgTableRowType,
174176
Combobox,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
type HeaderGroup,
1616
SearchInput,
1717
type LGTableDataType,
18+
getExpandedRowModel,
1819
getFilteredRowModel,
1920
type LgTableRowType,
2021
} from '@mongodb-js/compass-components';
@@ -105,6 +106,7 @@ export function ShardZonesTable({
105106
onExpandedChange: setExpanded,
106107
enableGlobalFilter: true,
107108
getFilteredRowModel: getFilteredRowModel(),
109+
getExpandedRowModel: getExpandedRowModel(),
108110
getIsRowExpanded: (row) => {
109111
return (
110112
(searchText && hasFilteredChildren(row)) ||

0 commit comments

Comments
 (0)