Skip to content

Commit 8da999a

Browse files
committed
move tanstack import
1 parent 15406f8 commit 8da999a

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@react-aria/interactions": "^3.9.1",
7777
"@react-aria/utils": "^3.13.1",
7878
"@react-aria/visually-hidden": "^3.3.1",
79+
"@tanstack/table-core": "^8.14.0",
7980
"bson": "^6.8.0",
8081
"focus-trap-react": "^9.0.2",
8182
"hadron-document": "^8.6.4",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ import {
5353
TableBody,
5454
flexRender,
5555
useLeafyGreenTable,
56+
getFilteredRowModel,
5657
} from '@leafygreen-ui/table';
58+
import type { Row as LgTableRowType } from '@tanstack/table-core';
59+
5760
export type {
5861
LGColumnDef,
5962
HeaderGroup,
@@ -172,4 +175,6 @@ export {
172175
InfoSprinkle,
173176
flexRender,
174177
useLeafyGreenTable,
178+
getFilteredRowModel,
179+
type LgTableRowType,
175180
};

packages/compass-global-writes/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
"react": "^17.0.2",
6363
"react-redux": "^8.1.3",
6464
"redux": "^4.2.1",
65-
"redux-thunk": "^2.4.2",
66-
"@tanstack/table-core": "^8.14.0"
65+
"redux-thunk": "^2.4.2"
6766
},
6867
"devDependencies": {
6968
"@mongodb-js/eslint-config-compass": "^1.1.7",

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
import React, { useCallback, useMemo, useRef, useState } from 'react';
2-
import {
3-
getFilteredRowModel,
4-
type Row as ReactTableRow,
5-
} from '@tanstack/table-core';
62
import {
73
Table,
84
TableBody,
@@ -19,6 +15,8 @@ import {
1915
type HeaderGroup,
2016
SearchInput,
2117
type LGTableDataType,
18+
getFilteredRowModel,
19+
LgTableRowType,
2220
} from '@mongodb-js/compass-components';
2321
import type { ShardZoneData } from '../store/reducer';
2422

@@ -78,7 +76,7 @@ const parseData = (shardZones: ShardZoneData[]): ShardZoneExpandableRow[] => {
7876
};
7977

8078
const hasFilteredChildren = (
81-
row: ReactTableRow<LGTableDataType<ShardZoneRow>>
79+
row: LgTableRowType<LGTableDataType<ShardZoneRow>>
8280
) =>
8381
row.subRows.filter(
8482
(subRow) => Object.values(subRow.columnFilters).includes(true) // columnFilters: e.g. { __global__: true }

0 commit comments

Comments
 (0)