material-react-table 0.3.1 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -162
- package/dist/MaterialReactTable.d.ts +17 -7
- package/dist/body/MRT_TableBodyCell.d.ts +3 -0
- package/dist/body/MRT_TableBodyRow.d.ts +16 -1
- package/dist/buttons/MRT_FullScreenToggleButton.d.ts +4 -0
- package/dist/buttons/MRT_ToggleSearchButton.d.ts +4 -0
- package/dist/head/MRT_TableHeadCell.d.ts +4 -1
- package/dist/head/MRT_TableHeadCellActions.d.ts +5 -0
- package/dist/inputs/MRT_EditCellTextField.d.ts +7 -0
- package/dist/inputs/MRT_FilterTextField.d.ts +1 -1
- package/dist/material-react-table.cjs.development.js +799 -441
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +800 -442
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/menus/MRT_ColumnActionMenu.d.ts +2 -2
- package/dist/menus/MRT_RowActionMenu.d.ts +1 -0
- package/dist/table/MRT_TableButtonCell.d.ts +3 -0
- package/dist/toolbar/MRT_ToolbarAlertBanner.d.ts +5 -0
- package/dist/toolbar/MRT_ToolbarInternalButtons.d.ts +5 -0
- package/dist/useMRT.d.ts +20 -0
- package/dist/utils/localization.d.ts +12 -3
- package/package.json +26 -23
- package/src/@types/faker.d.ts +4 -0
- package/src/@types/react-table-config.d.ts +156 -0
- package/src/MaterialReactTable.tsx +29 -9
- package/src/body/MRT_TableBody.tsx +3 -25
- package/src/body/MRT_TableBodyCell.tsx +30 -9
- package/src/body/MRT_TableBodyRow.tsx +22 -14
- package/src/body/MRT_TableDetailPanel.tsx +19 -8
- package/src/buttons/MRT_EditActionButtons.tsx +11 -6
- package/src/buttons/MRT_ExpandAllButton.tsx +19 -25
- package/src/buttons/MRT_ExpandButton.tsx +28 -26
- package/src/buttons/MRT_FullScreenToggleButton.tsx +23 -0
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +34 -3
- package/src/buttons/MRT_ToggleColumnActionMenuButton.tsx +5 -5
- package/src/buttons/MRT_ToggleFiltersButton.tsx +2 -2
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +48 -26
- package/src/buttons/MRT_ToggleSearchButton.tsx +33 -0
- package/src/footer/MRT_TableFooter.tsx +4 -4
- package/src/footer/MRT_TableFooterCell.tsx +23 -7
- package/src/footer/MRT_TableFooterRow.tsx +9 -4
- package/src/head/MRT_TableHead.tsx +4 -4
- package/src/head/MRT_TableHeadCell.tsx +41 -20
- package/src/head/MRT_TableHeadCellActions.tsx +18 -0
- package/src/head/MRT_TableHeadRow.tsx +17 -11
- package/src/inputs/MRT_DensePaddingSwitch.tsx +5 -3
- package/src/inputs/MRT_EditCellTextField.tsx +64 -0
- package/src/inputs/MRT_FilterTextField.tsx +43 -18
- package/src/inputs/MRT_SearchTextField.tsx +39 -34
- package/src/inputs/MRT_SelectAllCheckbox.tsx +10 -14
- package/src/inputs/MRT_SelectCheckbox.tsx +11 -13
- package/src/menus/MRT_ColumnActionMenu.tsx +66 -23
- package/src/menus/MRT_RowActionMenu.tsx +4 -8
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +24 -15
- package/src/table/MRT_Table.tsx +2 -2
- package/src/table/MRT_TableButtonCell.tsx +9 -0
- package/src/table/MRT_TableContainer.tsx +52 -5
- package/src/table/MRT_TableSpacerCell.tsx +5 -5
- package/src/toolbar/MRT_TablePagination.tsx +3 -2
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +102 -0
- package/src/toolbar/MRT_ToolbarBottom.tsx +11 -22
- package/src/toolbar/{MRT_ToolbarButtons.tsx → MRT_ToolbarInternalButtons.tsx} +13 -4
- package/src/toolbar/MRT_ToolbarTop.tsx +16 -30
- package/src/useMRT.tsx +112 -0
- package/src/utils/localization.ts +30 -12
- package/dist/toolbar/MRT_ToolbarButtons.d.ts +0 -5
- package/dist/useMaterialReactTable.d.ts +0 -15
- package/dist/utils/useMRTCalcs.d.ts +0 -11
- package/src/useMaterialReactTable.tsx +0 -96
- package/src/utils/useMRTCalcs.tsx +0 -42
package/src/useMRT.tsx
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
Context,
|
|
3
|
+
createContext,
|
|
4
|
+
PropsWithChildren,
|
|
5
|
+
useContext,
|
|
6
|
+
useMemo,
|
|
7
|
+
useState,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import {
|
|
10
|
+
PluginHook,
|
|
11
|
+
Row,
|
|
12
|
+
TableInstance,
|
|
13
|
+
useExpanded,
|
|
14
|
+
useFilters,
|
|
15
|
+
useFlexLayout,
|
|
16
|
+
useGlobalFilter,
|
|
17
|
+
useGroupBy,
|
|
18
|
+
usePagination,
|
|
19
|
+
useResizeColumns,
|
|
20
|
+
useRowSelect,
|
|
21
|
+
useSortBy,
|
|
22
|
+
useTable,
|
|
23
|
+
} from 'react-table';
|
|
24
|
+
import { MaterialReactTableProps } from './MaterialReactTable';
|
|
25
|
+
|
|
26
|
+
export interface UseMRT<D extends {} = {}> extends MaterialReactTableProps<D> {
|
|
27
|
+
anyRowsCanExpand: boolean;
|
|
28
|
+
anyRowsExpanded: boolean;
|
|
29
|
+
currentEditingRow: Row<D> | null;
|
|
30
|
+
densePadding: boolean;
|
|
31
|
+
fullScreen: boolean;
|
|
32
|
+
setCurrentEditingRow: (currentRowEditingId: Row<D> | null) => void;
|
|
33
|
+
setDensePadding: (densePadding: boolean) => void;
|
|
34
|
+
setFullScreen: (fullScreen: boolean) => void;
|
|
35
|
+
setShowFilters: (showFilters: boolean) => void;
|
|
36
|
+
setShowSearch: (showSearch: boolean) => void;
|
|
37
|
+
showFilters: boolean;
|
|
38
|
+
showSearch: boolean;
|
|
39
|
+
tableInstance: TableInstance<D>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const MaterialReactTableContext = (<D extends {}>() =>
|
|
43
|
+
createContext<UseMRT<D>>({} as UseMRT<D>) as Context<UseMRT<D>>)();
|
|
44
|
+
|
|
45
|
+
export const MaterialReactTableProvider = <D extends {}>(
|
|
46
|
+
props: PropsWithChildren<MaterialReactTableProps<D>>,
|
|
47
|
+
) => {
|
|
48
|
+
const hooks: PluginHook<D>[] = [
|
|
49
|
+
useFilters,
|
|
50
|
+
useGlobalFilter,
|
|
51
|
+
useGroupBy,
|
|
52
|
+
useSortBy,
|
|
53
|
+
useExpanded,
|
|
54
|
+
usePagination,
|
|
55
|
+
useRowSelect,
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
if (props.enableColumnResizing)
|
|
59
|
+
hooks.unshift(useResizeColumns, useFlexLayout);
|
|
60
|
+
|
|
61
|
+
const tableInstance = useTable<D>(props, ...hooks);
|
|
62
|
+
|
|
63
|
+
const anyRowsCanExpand = useMemo(
|
|
64
|
+
() => tableInstance.rows.some((row) => row.canExpand),
|
|
65
|
+
[tableInstance.rows],
|
|
66
|
+
);
|
|
67
|
+
const anyRowsExpanded = useMemo(
|
|
68
|
+
() => tableInstance.rows.some((row) => row.isExpanded),
|
|
69
|
+
[tableInstance.rows],
|
|
70
|
+
);
|
|
71
|
+
const [currentEditingRow, setCurrentEditingRow] = useState<Row | null>(null);
|
|
72
|
+
const [densePadding, setDensePadding] = useState(
|
|
73
|
+
props.defaultDensePadding ?? false,
|
|
74
|
+
);
|
|
75
|
+
const [fullScreen, setFullScreen] = useState(
|
|
76
|
+
props.defaultFullScreen ?? false,
|
|
77
|
+
);
|
|
78
|
+
const [showFilters, setShowFilters] = useState(
|
|
79
|
+
props.defaultShowFilters ?? false,
|
|
80
|
+
);
|
|
81
|
+
const [showSearch, setShowSearch] = useState(
|
|
82
|
+
props.defaultShowSearchTextField ?? false,
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<MaterialReactTableContext.Provider
|
|
87
|
+
value={{
|
|
88
|
+
...props,
|
|
89
|
+
anyRowsCanExpand,
|
|
90
|
+
anyRowsExpanded,
|
|
91
|
+
currentEditingRow,
|
|
92
|
+
densePadding,
|
|
93
|
+
setCurrentEditingRow,
|
|
94
|
+
setDensePadding,
|
|
95
|
+
fullScreen,
|
|
96
|
+
setFullScreen,
|
|
97
|
+
setShowFilters,
|
|
98
|
+
setShowSearch,
|
|
99
|
+
showFilters,
|
|
100
|
+
showSearch,
|
|
101
|
+
//@ts-ignore
|
|
102
|
+
tableInstance,
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
{props.children}
|
|
106
|
+
</MaterialReactTableContext.Provider>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const useMRT = <D extends {}>(): UseMRT<D> =>
|
|
111
|
+
//@ts-ignore
|
|
112
|
+
useContext<UseMRT<D>>(MaterialReactTableContext);
|
|
@@ -7,43 +7,61 @@ export interface MRT_Localization {
|
|
|
7
7
|
columnActionMenuItemSortAsc: string;
|
|
8
8
|
columnActionMenuItemSortDesc: string;
|
|
9
9
|
columnActionMenuItemUnGroupBy: string;
|
|
10
|
+
columnShowHideMenuHideAll: string;
|
|
11
|
+
columnShowHideMenuShowAll: string;
|
|
10
12
|
expandAllButtonTitle: string;
|
|
11
13
|
expandButtonTitle: string;
|
|
12
14
|
filterTextFieldClearButtonTitle: string;
|
|
13
15
|
filterTextFieldPlaceholder: string;
|
|
14
|
-
rowActionMenuButtonTitle: string;
|
|
15
|
-
rowActionsColumnTitle: string;
|
|
16
|
-
rowActionButtonSave: string;
|
|
17
16
|
rowActionButtonCancel: string;
|
|
17
|
+
rowActionButtonSave: string;
|
|
18
|
+
rowActionMenuButtonTitle: string;
|
|
18
19
|
rowActionMenuItemEdit: string;
|
|
20
|
+
rowActionsColumnTitle: string;
|
|
19
21
|
searchTextFieldClearButtonTitle: string;
|
|
20
22
|
searchTextFieldPlaceholder: string;
|
|
23
|
+
selectAllCheckboxTitle: string;
|
|
24
|
+
selectCheckboxTitle: string;
|
|
21
25
|
showHideColumnsButtonTitle: string;
|
|
22
26
|
toggleDensePaddingSwitchTitle: string;
|
|
23
27
|
toggleFilterButtonTitle: string;
|
|
28
|
+
toggleFullScreenButtonTitle: string;
|
|
29
|
+
toggleSearchButtonTitle: string;
|
|
30
|
+
toolbarAlertSelectionMessage: string;
|
|
31
|
+
toolbarAlertGroupedByMessage: string;
|
|
32
|
+
toolbarAlertGroupedThenByMessage: string;
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
export const defaultLocalization: MRT_Localization = {
|
|
27
36
|
actionsHeadColumnTitle: 'Actions',
|
|
28
37
|
columnActionMenuButtonTitle: 'Column Actions',
|
|
29
38
|
columnActionMenuItemClearSort: 'Clear sorting',
|
|
30
|
-
columnActionMenuItemGroupBy: 'Group by column',
|
|
31
|
-
columnActionMenuItemHideColumn: 'Hide column',
|
|
32
|
-
columnActionMenuItemSortAsc: 'Sort ascending',
|
|
33
|
-
columnActionMenuItemSortDesc: 'Sort descending',
|
|
34
|
-
columnActionMenuItemUnGroupBy: 'Ungroup column',
|
|
39
|
+
columnActionMenuItemGroupBy: 'Group by {column}',
|
|
40
|
+
columnActionMenuItemHideColumn: 'Hide {column} column',
|
|
41
|
+
columnActionMenuItemSortAsc: 'Sort by {column} ascending',
|
|
42
|
+
columnActionMenuItemSortDesc: 'Sort by {column} descending',
|
|
43
|
+
columnActionMenuItemUnGroupBy: 'Ungroup by {column}',
|
|
44
|
+
columnShowHideMenuHideAll: 'Hide all',
|
|
45
|
+
columnShowHideMenuShowAll: 'Show all',
|
|
35
46
|
expandAllButtonTitle: 'Expand all',
|
|
36
47
|
expandButtonTitle: 'Expand',
|
|
37
48
|
filterTextFieldClearButtonTitle: 'Clear filter',
|
|
38
|
-
filterTextFieldPlaceholder: 'Filter',
|
|
49
|
+
filterTextFieldPlaceholder: 'Filter by {column}',
|
|
50
|
+
rowActionButtonCancel: 'Cancel',
|
|
51
|
+
rowActionButtonSave: 'Save',
|
|
39
52
|
rowActionMenuButtonTitle: 'Row Actions',
|
|
40
|
-
rowActionsColumnTitle: 'Actions',
|
|
41
53
|
rowActionMenuItemEdit: 'Edit',
|
|
42
|
-
|
|
43
|
-
rowActionButtonCancel: 'Cancel',
|
|
54
|
+
rowActionsColumnTitle: 'Actions',
|
|
44
55
|
searchTextFieldClearButtonTitle: 'Clear search',
|
|
45
56
|
searchTextFieldPlaceholder: 'Search',
|
|
57
|
+
selectAllCheckboxTitle: 'Select all',
|
|
58
|
+
selectCheckboxTitle: 'Select row',
|
|
46
59
|
showHideColumnsButtonTitle: 'Show/Hide columns',
|
|
47
60
|
toggleDensePaddingSwitchTitle: 'Toggle dense padding',
|
|
48
61
|
toggleFilterButtonTitle: 'Toggle filters',
|
|
62
|
+
toggleFullScreenButtonTitle: 'Toggle full screen',
|
|
63
|
+
toggleSearchButtonTitle: 'Toggle search',
|
|
64
|
+
toolbarAlertSelectionMessage: '{selectedCount} of {rowCount} row(s) selected',
|
|
65
|
+
toolbarAlertGroupedByMessage: 'Grouped by ',
|
|
66
|
+
toolbarAlertGroupedThenByMessage: ', then by ',
|
|
49
67
|
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { TableInstance } from 'react-table';
|
|
3
|
-
import { MaterialReactTableProps } from './MaterialReactTable';
|
|
4
|
-
import { UseMRTCalcs } from './utils/useMRTCalcs';
|
|
5
|
-
export interface UseMaterialReactTable<D extends {}> extends MaterialReactTableProps<D>, UseMRTCalcs {
|
|
6
|
-
currentEditingRowId: string | null;
|
|
7
|
-
densePadding: boolean;
|
|
8
|
-
setCurrentEditingRowId: (currentRowEditingId: string | null) => void;
|
|
9
|
-
setDensePadding: (densePadding: boolean) => void;
|
|
10
|
-
setShowFilters: (showFilters: boolean) => void;
|
|
11
|
-
showFilters: boolean;
|
|
12
|
-
tableInstance: TableInstance<D>;
|
|
13
|
-
}
|
|
14
|
-
export declare const MaterialReactTableProvider: <D extends {}>(props: React.PropsWithChildren<MaterialReactTableProps<D>>) => JSX.Element;
|
|
15
|
-
export declare const useMaterialReactTable: <D extends {}>() => UseMaterialReactTable<D>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TableInstance } from 'react-table';
|
|
2
|
-
export interface UseMRTCalcs {
|
|
3
|
-
anyRowsCanExpand: boolean;
|
|
4
|
-
anyRowsExpanded: boolean;
|
|
5
|
-
maxColumnDepth: number;
|
|
6
|
-
}
|
|
7
|
-
interface Props<D extends {}> {
|
|
8
|
-
tableInstance: TableInstance<D>;
|
|
9
|
-
}
|
|
10
|
-
export declare const useMRTCalcs: <D extends {}>({ tableInstance, }: Props<D>) => UseMRTCalcs;
|
|
11
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
Context,
|
|
3
|
-
createContext,
|
|
4
|
-
PropsWithChildren,
|
|
5
|
-
useContext,
|
|
6
|
-
useState,
|
|
7
|
-
} from 'react';
|
|
8
|
-
import {
|
|
9
|
-
PluginHook,
|
|
10
|
-
TableInstance,
|
|
11
|
-
useExpanded,
|
|
12
|
-
useFilters,
|
|
13
|
-
useFlexLayout,
|
|
14
|
-
useGlobalFilter,
|
|
15
|
-
useGroupBy,
|
|
16
|
-
usePagination,
|
|
17
|
-
useResizeColumns,
|
|
18
|
-
useRowSelect,
|
|
19
|
-
useSortBy,
|
|
20
|
-
useTable,
|
|
21
|
-
} from 'react-table';
|
|
22
|
-
import { MaterialReactTableProps } from './MaterialReactTable';
|
|
23
|
-
import { UseMRTCalcs, useMRTCalcs } from './utils/useMRTCalcs';
|
|
24
|
-
|
|
25
|
-
export interface UseMaterialReactTable<D extends {}>
|
|
26
|
-
extends MaterialReactTableProps<D>,
|
|
27
|
-
UseMRTCalcs {
|
|
28
|
-
currentEditingRowId: string | null;
|
|
29
|
-
densePadding: boolean;
|
|
30
|
-
setCurrentEditingRowId: (currentRowEditingId: string | null) => void;
|
|
31
|
-
setDensePadding: (densePadding: boolean) => void;
|
|
32
|
-
setShowFilters: (showFilters: boolean) => void;
|
|
33
|
-
showFilters: boolean;
|
|
34
|
-
tableInstance: TableInstance<D>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const MaterialReactTableContext = (<D extends {}>() =>
|
|
38
|
-
createContext<UseMaterialReactTable<D>>(
|
|
39
|
-
{} as UseMaterialReactTable<D>,
|
|
40
|
-
) as Context<UseMaterialReactTable<D>>)();
|
|
41
|
-
|
|
42
|
-
export const MaterialReactTableProvider = <D extends {}>(
|
|
43
|
-
props: PropsWithChildren<MaterialReactTableProps<D>>,
|
|
44
|
-
) => {
|
|
45
|
-
const hooks: PluginHook<D>[] = [
|
|
46
|
-
useResizeColumns,
|
|
47
|
-
useFilters,
|
|
48
|
-
useGlobalFilter,
|
|
49
|
-
useGroupBy,
|
|
50
|
-
useSortBy,
|
|
51
|
-
useExpanded,
|
|
52
|
-
usePagination,
|
|
53
|
-
useRowSelect,
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
if (props.enableColumnResizing) hooks.unshift(useFlexLayout);
|
|
57
|
-
|
|
58
|
-
const tableInstance = useTable<D>(props, ...hooks);
|
|
59
|
-
|
|
60
|
-
const mrtCalcs = useMRTCalcs({ tableInstance });
|
|
61
|
-
|
|
62
|
-
const [showFilters, setShowFilters] = useState<boolean>(
|
|
63
|
-
props.defaultShowFilters ?? false,
|
|
64
|
-
);
|
|
65
|
-
const [densePadding, setDensePadding] = useState<boolean>(
|
|
66
|
-
props.defaultDensePadding ?? false,
|
|
67
|
-
);
|
|
68
|
-
const [currentEditingRowId, setCurrentEditingRowId] = useState<string | null>(
|
|
69
|
-
null,
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<MaterialReactTableContext.Provider
|
|
74
|
-
value={{
|
|
75
|
-
...mrtCalcs,
|
|
76
|
-
...props,
|
|
77
|
-
densePadding,
|
|
78
|
-
setDensePadding,
|
|
79
|
-
setShowFilters,
|
|
80
|
-
currentEditingRowId,
|
|
81
|
-
setCurrentEditingRowId,
|
|
82
|
-
showFilters,
|
|
83
|
-
// @ts-ignore
|
|
84
|
-
tableInstance,
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
{props.children}
|
|
88
|
-
</MaterialReactTableContext.Provider>
|
|
89
|
-
);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const useMaterialReactTable = <
|
|
93
|
-
D extends {},
|
|
94
|
-
>(): UseMaterialReactTable<D> =>
|
|
95
|
-
//@ts-ignore
|
|
96
|
-
useContext<UseMaterialReactTable<D>>(MaterialReactTableContext);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { TableInstance } from 'react-table';
|
|
3
|
-
|
|
4
|
-
export interface UseMRTCalcs {
|
|
5
|
-
anyRowsCanExpand: boolean;
|
|
6
|
-
anyRowsExpanded: boolean;
|
|
7
|
-
maxColumnDepth: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface Props<D extends {}> {
|
|
11
|
-
tableInstance: TableInstance<D>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const useMRTCalcs = <D extends {}>({
|
|
15
|
-
tableInstance,
|
|
16
|
-
}: Props<D>): UseMRTCalcs => {
|
|
17
|
-
const anyRowsCanExpand = useMemo(
|
|
18
|
-
() => tableInstance.rows.some((row) => row.canExpand),
|
|
19
|
-
[tableInstance.rows],
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const anyRowsExpanded = useMemo(
|
|
23
|
-
() => tableInstance.rows.some((row) => row.isExpanded),
|
|
24
|
-
[tableInstance.rows],
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const maxColumnDepth = useMemo(() => {
|
|
28
|
-
let maxDepth = 1;
|
|
29
|
-
tableInstance.columns.forEach((column) => {
|
|
30
|
-
if (column.columns?.length) {
|
|
31
|
-
maxDepth = Math.max(maxDepth, column.columns.length);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return maxDepth - 1;
|
|
35
|
-
}, [tableInstance.columns]);
|
|
36
|
-
|
|
37
|
-
return {
|
|
38
|
-
anyRowsCanExpand,
|
|
39
|
-
anyRowsExpanded,
|
|
40
|
-
maxColumnDepth,
|
|
41
|
-
};
|
|
42
|
-
};
|