@mui/x-data-grid-pro 5.17.5 → 6.0.0-alpha.1
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/CHANGELOG.md +297 -19
- package/DataGridPro/DataGridPro.js +4 -14
- package/DataGridPro/useDataGridProProps.js +2 -2
- package/components/DataGridProVirtualScroller.js +2 -2
- package/components/GridDetailPanelToggleCell.js +1 -1
- package/components/GridRowReorderCell.js +4 -6
- package/components/GridTreeDataGroupingCell.d.ts +2 -2
- package/components/GridTreeDataGroupingCell.js +1 -1
- package/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/hooks/features/detailPanel/useGridDetailPanelCache.js +2 -2
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +2 -2
- package/hooks/features/lazyLoader/useGridLazyLoader.js +20 -9
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +20 -6
- package/hooks/features/rowPinning/gridRowPinningInterface.d.ts +2 -2
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +16 -16
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +62 -25
- package/hooks/features/rowReorder/useGridRowReorder.js +5 -5
- package/hooks/features/treeData/gridTreeDataGroupColDef.js +1 -1
- package/hooks/features/treeData/gridTreeDataUtils.js +14 -12
- package/hooks/features/treeData/useGridTreeData.js +2 -6
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +35 -18
- package/index.js +1 -1
- package/internals/index.d.ts +4 -2
- package/internals/index.js +4 -2
- package/legacy/DataGridPro/DataGridPro.js +4 -14
- package/legacy/DataGridPro/useDataGridProProps.js +2 -2
- package/legacy/components/DataGridProVirtualScroller.js +2 -2
- package/legacy/components/GridDetailPanelToggleCell.js +1 -1
- package/legacy/components/GridRowReorderCell.js +4 -6
- package/legacy/components/GridTreeDataGroupingCell.js +1 -1
- package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/legacy/hooks/features/detailPanel/useGridDetailPanelCache.js +2 -2
- package/legacy/hooks/features/infiniteLoader/useGridInfiniteLoader.js +2 -2
- package/legacy/hooks/features/lazyLoader/useGridLazyLoader.js +25 -15
- package/legacy/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +21 -7
- package/legacy/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +62 -25
- package/legacy/hooks/features/rowReorder/useGridRowReorder.js +5 -5
- package/legacy/hooks/features/treeData/gridTreeDataGroupColDef.js +1 -1
- package/legacy/hooks/features/treeData/gridTreeDataUtils.js +14 -12
- package/legacy/hooks/features/treeData/useGridTreeData.js +2 -6
- package/legacy/hooks/features/treeData/useGridTreeDataPreProcessors.js +37 -22
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +4 -2
- package/legacy/utils/tree/createRowTree.js +36 -0
- package/legacy/utils/tree/index.js +1 -1
- package/legacy/utils/tree/insertDataRowInTree.js +127 -0
- package/legacy/utils/tree/models.js +1 -0
- package/legacy/utils/tree/removeDataRowFromTree.js +97 -0
- package/legacy/utils/tree/sortRowTree.js +49 -43
- package/legacy/utils/tree/updateRowTree.js +81 -0
- package/legacy/utils/tree/utils.js +184 -0
- package/models/dataGridProProps.d.ts +3 -3
- package/modern/DataGridPro/DataGridPro.js +4 -14
- package/modern/DataGridPro/useDataGridProProps.js +2 -2
- package/modern/components/DataGridProVirtualScroller.js +2 -2
- package/modern/components/GridDetailPanelToggleCell.js +1 -1
- package/modern/components/GridRowReorderCell.js +4 -4
- package/modern/components/GridTreeDataGroupingCell.js +1 -1
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/modern/hooks/features/detailPanel/useGridDetailPanelCache.js +2 -2
- package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.js +2 -2
- package/modern/hooks/features/lazyLoader/useGridLazyLoader.js +20 -9
- package/modern/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +20 -6
- package/modern/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +60 -23
- package/modern/hooks/features/rowReorder/useGridRowReorder.js +5 -3
- package/modern/hooks/features/treeData/gridTreeDataGroupColDef.js +1 -1
- package/modern/hooks/features/treeData/gridTreeDataUtils.js +13 -9
- package/modern/hooks/features/treeData/useGridTreeData.js +2 -4
- package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.js +35 -18
- package/modern/index.js +1 -1
- package/modern/internals/index.js +4 -2
- package/modern/utils/tree/createRowTree.js +35 -0
- package/modern/utils/tree/index.js +1 -1
- package/modern/utils/tree/insertDataRowInTree.js +127 -0
- package/modern/utils/tree/models.js +1 -0
- package/modern/utils/tree/removeDataRowFromTree.js +100 -0
- package/modern/utils/tree/sortRowTree.js +46 -40
- package/modern/utils/tree/updateRowTree.js +83 -0
- package/modern/utils/tree/utils.js +180 -0
- package/node/DataGridPro/DataGridPro.js +4 -14
- package/node/DataGridPro/useDataGridProProps.js +1 -1
- package/node/components/DataGridProVirtualScroller.js +1 -1
- package/node/components/GridDetailPanelToggleCell.js +1 -1
- package/node/components/GridRowReorderCell.js +3 -5
- package/node/components/GridTreeDataGroupingCell.js +1 -1
- package/node/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
- package/node/hooks/features/detailPanel/useGridDetailPanelCache.js +1 -1
- package/node/hooks/features/infiniteLoader/useGridInfiniteLoader.js +1 -1
- package/node/hooks/features/lazyLoader/useGridLazyLoader.js +19 -8
- package/node/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +18 -5
- package/node/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +63 -26
- package/node/hooks/features/rowReorder/useGridRowReorder.js +4 -4
- package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +1 -1
- package/node/hooks/features/treeData/gridTreeDataUtils.js +14 -12
- package/node/hooks/features/treeData/useGridTreeData.js +1 -5
- package/node/hooks/features/treeData/useGridTreeDataPreProcessors.js +35 -17
- package/node/index.js +1 -1
- package/node/internals/index.js +35 -10
- package/node/utils/tree/createRowTree.js +46 -0
- package/node/utils/tree/index.js +2 -2
- package/node/utils/tree/insertDataRowInTree.js +139 -0
- package/node/utils/tree/models.js +5 -0
- package/node/utils/tree/removeDataRowFromTree.js +110 -0
- package/node/utils/tree/sortRowTree.js +50 -43
- package/node/utils/tree/updateRowTree.js +98 -0
- package/node/utils/tree/utils.js +217 -0
- package/package.json +5 -5
- package/utils/tree/createRowTree.d.ts +15 -0
- package/utils/tree/createRowTree.js +35 -0
- package/utils/tree/index.d.ts +1 -1
- package/utils/tree/index.js +1 -1
- package/utils/tree/insertDataRowInTree.d.ts +51 -0
- package/utils/tree/insertDataRowInTree.js +129 -0
- package/utils/tree/models.d.ts +13 -0
- package/utils/tree/models.js +1 -0
- package/utils/tree/removeDataRowFromTree.d.ts +40 -0
- package/utils/tree/removeDataRowFromTree.js +100 -0
- package/utils/tree/sortRowTree.d.ts +6 -1
- package/utils/tree/sortRowTree.js +46 -40
- package/utils/tree/updateRowTree.d.ts +19 -0
- package/utils/tree/updateRowTree.js +83 -0
- package/utils/tree/utils.d.ts +66 -0
- package/utils/tree/utils.js +186 -0
- package/legacy/utils/tree/buildRowTree.js +0 -195
- package/modern/utils/tree/buildRowTree.js +0 -174
- package/node/utils/tree/buildRowTree.js +0 -195
- package/utils/tree/buildRowTree.d.ts +0 -48
- package/utils/tree/buildRowTree.js +0 -186
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES
|
|
4
|
+
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES } from '@mui/x-data-grid';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The default values of `DataGridProPropsWithDefaultValue` to inject in the props of DataGridPro.
|
|
@@ -14,7 +14,7 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
|
|
|
14
14
|
disableChildrenFiltering: false,
|
|
15
15
|
disableChildrenSorting: false,
|
|
16
16
|
rowReordering: false,
|
|
17
|
-
rowsLoadingMode:
|
|
17
|
+
rowsLoadingMode: 'client',
|
|
18
18
|
getDetailPanelHeight: () => 500
|
|
19
19
|
});
|
|
20
20
|
export const useDataGridProProps = inProps => {
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "disableVirtualization"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled, alpha } from '@mui/material/styles';
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
7
|
-
import { useGridSelector, getDataGridUtilityClass, gridClasses, gridVisibleColumnFieldsSelector, gridRowsMetaSelector, useGridApiEventHandler } from '@mui/x-data-grid';
|
|
7
|
+
import { useGridSelector, getDataGridUtilityClass, gridClasses, gridVisibleColumnFieldsSelector, gridRowsMetaSelector, useGridApiEventHandler, GridOverlays } from '@mui/x-data-grid';
|
|
8
8
|
import { GridVirtualScroller, GridVirtualScrollerContent, GridVirtualScrollerRenderZone, useGridVirtualScroller, calculatePinnedRowsHeight } from '@mui/x-data-grid/internals';
|
|
9
9
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
10
10
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
@@ -297,7 +297,7 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({}, getRootProps(other), {
|
|
300
|
-
children: [topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
300
|
+
children: [/*#__PURE__*/_jsx(GridOverlays, {}), topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
|
|
301
301
|
className: classes.topPinnedRows,
|
|
302
302
|
ownerState: {
|
|
303
303
|
position: 'top'
|
|
@@ -116,7 +116,7 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
116
116
|
/**
|
|
117
117
|
* The row model of the row that the current cell belongs to.
|
|
118
118
|
*/
|
|
119
|
-
row: PropTypes.
|
|
119
|
+
row: PropTypes.any.isRequired,
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* The node of the row that the current cell belongs to.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
4
|
-
import {
|
|
4
|
+
import { gridRowMaximumTreeDepthSelector, gridSortModelSelector, useGridApiContext, useGridSelector, getDataGridUtilityClass, gridEditRowsStateSelector } from '@mui/x-data-grid';
|
|
5
5
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -22,7 +22,7 @@ const GridRowReorderCell = params => {
|
|
|
22
22
|
const apiRef = useGridApiContext();
|
|
23
23
|
const rootProps = useGridRootProps();
|
|
24
24
|
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
|
25
|
-
const treeDepth = useGridSelector(apiRef,
|
|
25
|
+
const treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
|
|
26
26
|
const editRowsState = useGridSelector(apiRef, gridEditRowsStateSelector); // eslint-disable-next-line no-underscore-dangle
|
|
27
27
|
|
|
28
28
|
const cellValue = params.row.__reorder__ || params.id; // TODO: remove sortModel and treeDepth checks once row reorder is compatible
|
|
@@ -58,7 +58,7 @@ const GridRowReorderCell = params => {
|
|
|
58
58
|
onDragEnd: publish('rowDragEnd')
|
|
59
59
|
} : null;
|
|
60
60
|
|
|
61
|
-
if (
|
|
61
|
+
if (params.rowNode.type === 'footer') {
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -75,7 +75,7 @@ const GridRowReorderCell = params => {
|
|
|
75
75
|
|
|
76
76
|
export { GridRowReorderCell };
|
|
77
77
|
export const renderRowReorderCell = params => {
|
|
78
|
-
if (params.rowNode.
|
|
78
|
+
if (params.rowNode.type === 'footer' || params.rowNode.type === 'pinnedRow') {
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -149,7 +149,7 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
149
149
|
/**
|
|
150
150
|
* The row model of the row that the current cell belongs to.
|
|
151
151
|
*/
|
|
152
|
-
row: PropTypes.
|
|
152
|
+
row: PropTypes.any.isRequired,
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* The node of the row that the current cell belongs to.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useGridSelector, useGridApiEventHandler, useGridApiMethod,
|
|
3
|
+
import { useGridSelector, useGridApiEventHandler, useGridApiMethod, gridDataRowIdsSelector } from '@mui/x-data-grid';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from './gridDetailPanelToggleColDef';
|
|
6
6
|
import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector, gridDetailPanelRawHeightCacheSelector } from './gridDetailPanelSelector';
|
|
@@ -20,7 +20,7 @@ function cacheContentAndHeight(apiRef, getDetailPanelContent, getDetailPanelHeig
|
|
|
20
20
|
// only call getDetailPanelContent when asked for an id
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
const rowIds =
|
|
23
|
+
const rowIds = gridDataRowIdsSelector(apiRef);
|
|
24
24
|
const contentCache = rowIds.reduce((acc, id) => {
|
|
25
25
|
const params = apiRef.current.getRowParams(id);
|
|
26
26
|
acc[id] = getDetailPanelContent(params);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useGridApiEventHandler,
|
|
3
|
+
import { useGridApiEventHandler, gridDataRowIdsSelector } from '@mui/x-data-grid';
|
|
4
4
|
|
|
5
5
|
function cacheContentAndHeight(apiRef, getDetailPanelContent, getDetailPanelHeight, previousHeightCache) {
|
|
6
6
|
if (typeof getDetailPanelContent !== 'function') {
|
|
@@ -9,7 +9,7 @@ function cacheContentAndHeight(apiRef, getDetailPanelContent, getDetailPanelHeig
|
|
|
9
9
|
// only call getDetailPanelContent when asked for an id
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
const rowIds =
|
|
12
|
+
const rowIds = gridDataRowIdsSelector(apiRef);
|
|
13
13
|
const contentCache = rowIds.reduce((acc, id) => {
|
|
14
14
|
const params = apiRef.current.getRowParams(id);
|
|
15
15
|
acc[id] = getDetailPanelContent(params);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useGridSelector, useGridApiEventHandler, useGridApiOptionHandler, gridVisibleColumnDefinitionsSelector, gridRowsMetaSelector
|
|
2
|
+
import { useGridSelector, useGridApiEventHandler, useGridApiOptionHandler, gridVisibleColumnDefinitionsSelector, gridRowsMetaSelector } from '@mui/x-data-grid';
|
|
3
3
|
import { useGridVisibleRows } from '@mui/x-data-grid/internals';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -16,7 +16,7 @@ export const useGridInfiniteLoader = (apiRef, props) => {
|
|
|
16
16
|
const handleRowsScrollEnd = React.useCallback(scrollPosition => {
|
|
17
17
|
const dimensions = apiRef.current.getRootDimensions(); // Prevent the infite loading working in combination with lazy loading
|
|
18
18
|
|
|
19
|
-
if (!dimensions || props.rowsLoadingMode !==
|
|
19
|
+
if (!dimensions || props.rowsLoadingMode !== 'client') {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useGridApiEventHandler,
|
|
2
|
+
import { useGridApiEventHandler, useGridSelector, gridSortModelSelector, gridFilterModelSelector, useGridApiOptionHandler } from '@mui/x-data-grid';
|
|
3
3
|
import { useGridVisibleRows, getRenderableIndexes } from '@mui/x-data-grid/internals';
|
|
4
4
|
|
|
5
|
-
function findSkeletonRowsSection(
|
|
5
|
+
function findSkeletonRowsSection({
|
|
6
|
+
apiRef,
|
|
7
|
+
visibleRows,
|
|
8
|
+
range
|
|
9
|
+
}) {
|
|
6
10
|
let {
|
|
7
11
|
firstRowIndex,
|
|
8
12
|
lastRowIndex
|
|
@@ -13,16 +17,19 @@ function findSkeletonRowsSection(visibleRows, range) {
|
|
|
13
17
|
let isSkeletonSectionFound = false;
|
|
14
18
|
|
|
15
19
|
while (!isSkeletonSectionFound && firstRowIndex < lastRowIndex) {
|
|
16
|
-
|
|
20
|
+
const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id).type === 'skeletonRow';
|
|
21
|
+
const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id).type === 'skeletonRow';
|
|
22
|
+
|
|
23
|
+
if (isStartingWithASkeletonRow && isEndingWithASkeletonRow) {
|
|
17
24
|
isSkeletonSectionFound = true;
|
|
18
25
|
}
|
|
19
26
|
|
|
20
|
-
if (
|
|
27
|
+
if (!isStartingWithASkeletonRow) {
|
|
21
28
|
startIndex += 1;
|
|
22
29
|
firstRowIndex += 1;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
|
-
if (
|
|
32
|
+
if (!isEndingWithASkeletonRow) {
|
|
26
33
|
endIndex -= 1;
|
|
27
34
|
lastRowIndex -= 1;
|
|
28
35
|
}
|
|
@@ -43,7 +50,7 @@ function isLazyLoadingDisabled({
|
|
|
43
50
|
return true;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
|
-
if (rowsLoadingMode !==
|
|
53
|
+
if (rowsLoadingMode !== 'server') {
|
|
47
54
|
return true;
|
|
48
55
|
}
|
|
49
56
|
|
|
@@ -105,9 +112,13 @@ export const useGridLazyLoader = (apiRef, props) => {
|
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
if (sortModel.length === 0 && filterModel.items.length === 0) {
|
|
108
|
-
const skeletonRowsSection = findSkeletonRowsSection(
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
const skeletonRowsSection = findSkeletonRowsSection({
|
|
116
|
+
apiRef,
|
|
117
|
+
visibleRows: visibleRows.rows,
|
|
118
|
+
range: {
|
|
119
|
+
firstRowIndex: params.firstRowToRender,
|
|
120
|
+
lastRowIndex: params.lastRowToRender
|
|
121
|
+
}
|
|
111
122
|
});
|
|
112
123
|
|
|
113
124
|
if (!skeletonRowsSection) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
4
|
-
import {
|
|
4
|
+
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
|
|
5
5
|
export const GRID_SKELETON_ROW_ROOT_ID = 'auto-generated-skeleton-row-root';
|
|
6
6
|
|
|
7
7
|
const getSkeletonRowId = index => `${GRID_SKELETON_ROW_ROOT_ID}-${index}`;
|
|
@@ -11,19 +11,33 @@ export const useGridLazyLoaderPreProcessors = (apiRef, props) => {
|
|
|
11
11
|
lazyLoading
|
|
12
12
|
} = props.experimentalFeatures ?? {};
|
|
13
13
|
const addSkeletonRows = React.useCallback(groupingParams => {
|
|
14
|
-
|
|
14
|
+
const tree = _extends({}, groupingParams.tree);
|
|
15
|
+
|
|
16
|
+
const rootGroup = tree[GRID_ROOT_GROUP_ID];
|
|
17
|
+
|
|
18
|
+
if (!lazyLoading || props.rowsLoadingMode !== 'server' || !props.rowCount || rootGroup.children.length >= props.rowCount) {
|
|
15
19
|
return groupingParams;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
const
|
|
22
|
+
const rootGroupChildren = [...rootGroup.children];
|
|
19
23
|
|
|
20
|
-
for (let i = 0; i < props.rowCount -
|
|
24
|
+
for (let i = 0; i < props.rowCount - rootGroup.children.length; i += 1) {
|
|
21
25
|
const skeletonId = getSkeletonRowId(i);
|
|
22
|
-
|
|
26
|
+
rootGroupChildren.push(skeletonId);
|
|
27
|
+
const skeletonRowNode = {
|
|
28
|
+
type: 'skeletonRow',
|
|
29
|
+
id: skeletonId,
|
|
30
|
+
parent: GRID_ROOT_GROUP_ID,
|
|
31
|
+
depth: 0
|
|
32
|
+
};
|
|
33
|
+
tree[skeletonId] = skeletonRowNode;
|
|
23
34
|
}
|
|
24
35
|
|
|
36
|
+
tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroup, {
|
|
37
|
+
children: rootGroupChildren
|
|
38
|
+
});
|
|
25
39
|
return _extends({}, groupingParams, {
|
|
26
|
-
|
|
40
|
+
tree
|
|
27
41
|
});
|
|
28
42
|
}, [props.rowCount, props.rowsLoadingMode, lazyLoading]);
|
|
29
43
|
useGridRegisterPipeProcessor(apiRef, 'hydrateRows', addSkeletonRows);
|
|
@@ -1,40 +1,66 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
4
|
+
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
|
|
5
|
+
import { insertNodeInTree } from '../../../utils/tree/utils';
|
|
4
6
|
export function addPinnedRow({
|
|
5
7
|
groupingParams,
|
|
6
8
|
rowModel,
|
|
7
9
|
rowId,
|
|
8
10
|
position,
|
|
9
|
-
apiRef
|
|
11
|
+
apiRef,
|
|
12
|
+
isAutoGenerated
|
|
10
13
|
}) {
|
|
11
|
-
const
|
|
14
|
+
const dataRowIdToModelLookup = _extends({}, groupingParams.dataRowIdToModelLookup);
|
|
12
15
|
|
|
13
|
-
const
|
|
16
|
+
const dataRowIdToIdLookup = _extends({}, groupingParams.dataRowIdToIdLookup);
|
|
14
17
|
|
|
18
|
+
const tree = _extends({}, groupingParams.tree);
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
// ids.push(rowId);
|
|
20
|
+
const treeDepths = _extends({}, groupingParams.treeDepths); // TODO: warn if id is already present in `props.rows`
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
|
|
23
|
+
const node = {
|
|
24
|
+
type: 'pinnedRow',
|
|
20
25
|
id: rowId,
|
|
21
|
-
isAutoGenerated: false,
|
|
22
|
-
parent: null,
|
|
23
26
|
depth: 0,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
isPinned: true
|
|
27
|
+
parent: GRID_ROOT_GROUP_ID,
|
|
28
|
+
isAutoGenerated
|
|
27
29
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
insertNodeInTree({
|
|
31
|
+
node,
|
|
32
|
+
tree,
|
|
33
|
+
treeDepths
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (!isAutoGenerated) {
|
|
37
|
+
dataRowIdToModelLookup[rowId] = rowModel;
|
|
38
|
+
dataRowIdToIdLookup[rowId] = rowId;
|
|
39
|
+
} // Do not push it to ids list so that pagination is not affected by pinned rows
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
apiRef.current.unstable_caches.rows.dataRowIdToModelLookup[rowId] = _extends({}, rowModel);
|
|
43
|
+
apiRef.current.unstable_caches.rows.dataRowIdToIdLookup[rowId] = rowId;
|
|
30
44
|
const previousPinnedRows = groupingParams.additionalRowGroups?.pinnedRows || {};
|
|
31
45
|
const newPinnedRow = {
|
|
32
46
|
id: rowId,
|
|
33
47
|
model: rowModel
|
|
34
48
|
};
|
|
49
|
+
|
|
50
|
+
if (groupingParams.additionalRowGroups?.pinnedRows?.[position]?.includes(newPinnedRow)) {
|
|
51
|
+
return _extends({}, groupingParams, {
|
|
52
|
+
dataRowIdToModelLookup,
|
|
53
|
+
dataRowIdToIdLookup,
|
|
54
|
+
tree,
|
|
55
|
+
treeDepths
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
35
59
|
return _extends({}, groupingParams, {
|
|
36
|
-
|
|
60
|
+
dataRowIdToModelLookup,
|
|
61
|
+
dataRowIdToIdLookup,
|
|
37
62
|
tree,
|
|
63
|
+
treeDepths,
|
|
38
64
|
additionalRowGroups: _extends({}, groupingParams.additionalRowGroups, {
|
|
39
65
|
pinnedRows: _extends({}, previousPinnedRows, {
|
|
40
66
|
[position]: [...(previousPinnedRows[position] || []), newPinnedRow]
|
|
@@ -59,7 +85,8 @@ export const useGridRowPinningPreProcessors = apiRef => {
|
|
|
59
85
|
rowModel: pinnedRowsCache.idLookup[rowId],
|
|
60
86
|
rowId,
|
|
61
87
|
position: 'top',
|
|
62
|
-
apiRef
|
|
88
|
+
apiRef,
|
|
89
|
+
isAutoGenerated: false
|
|
63
90
|
});
|
|
64
91
|
});
|
|
65
92
|
pinnedRowsCache.bottomIds?.forEach(rowId => {
|
|
@@ -68,17 +95,27 @@ export const useGridRowPinningPreProcessors = apiRef => {
|
|
|
68
95
|
rowModel: pinnedRowsCache.idLookup[rowId],
|
|
69
96
|
rowId,
|
|
70
97
|
position: 'bottom',
|
|
71
|
-
apiRef
|
|
98
|
+
apiRef,
|
|
99
|
+
isAutoGenerated: false
|
|
72
100
|
});
|
|
73
|
-
}); // If row with the same `id` is present both in `rows` and `pinnedRows` - remove it from
|
|
101
|
+
}); // If row with the same `id` is present both in `rows` and `pinnedRows` - remove it from the root group children
|
|
74
102
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
103
|
+
if (pinnedRowsCache.bottomIds?.length || pinnedRowsCache.topIds?.length) {
|
|
104
|
+
const shouldKeepRow = rowId => {
|
|
105
|
+
if (newGroupingParams.tree[rowId] && newGroupingParams.tree[rowId].type === 'pinnedRow') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return true;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const rootGroupNode = newGroupingParams.tree[GRID_ROOT_GROUP_ID];
|
|
113
|
+
newGroupingParams.tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroupNode, {
|
|
114
|
+
children: rootGroupNode.children.filter(shouldKeepRow)
|
|
115
|
+
});
|
|
116
|
+
newGroupingParams.dataRowIds = newGroupingParams.dataRowIds.filter(shouldKeepRow);
|
|
117
|
+
}
|
|
79
118
|
|
|
80
|
-
return true;
|
|
81
|
-
});
|
|
82
119
|
return newGroupingParams;
|
|
83
120
|
}, [apiRef]);
|
|
84
121
|
useGridRegisterPipeProcessor(apiRef, 'hydrateRows', addPinnedRows);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
3
|
-
import { useGridLogger, useGridApiEventHandler, getDataGridUtilityClass, useGridSelector, gridSortModelSelector,
|
|
3
|
+
import { useGridLogger, useGridApiEventHandler, getDataGridUtilityClass, useGridSelector, gridSortModelSelector, gridRowMaximumTreeDepthSelector, useGridApiOptionHandler, gridEditRowsStateSelector } from '@mui/x-data-grid';
|
|
4
4
|
|
|
5
5
|
const useUtilityClasses = ownerState => {
|
|
6
6
|
const {
|
|
@@ -20,7 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
20
20
|
export const useGridRowReorder = (apiRef, props) => {
|
|
21
21
|
const logger = useGridLogger(apiRef, 'useGridRowReorder');
|
|
22
22
|
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
|
23
|
-
const treeDepth = useGridSelector(apiRef,
|
|
23
|
+
const treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
|
|
24
24
|
const dragRowNode = React.useRef(null);
|
|
25
25
|
const originRowIndex = React.useRef(null);
|
|
26
26
|
const removeDnDStylesTimeout = React.useRef();
|
|
@@ -64,7 +64,9 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
const rowNode = apiRef.current.getRowNode(params.id);
|
|
68
|
+
|
|
69
|
+
if (!rowNode || rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
|
|
68
70
|
return;
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -12,7 +12,7 @@ export const GRID_TREE_DATA_GROUPING_COL_DEF = _extends({}, GRID_STRING_COL_DEF,
|
|
|
12
12
|
disableReorder: true,
|
|
13
13
|
align: 'left',
|
|
14
14
|
width: 200,
|
|
15
|
-
valueGetter: params => params.rowNode.groupingKey
|
|
15
|
+
valueGetter: params => params.rowNode.type === 'group' ? params.rowNode.groupingKey : undefined
|
|
16
16
|
});
|
|
17
17
|
export const GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
|
|
18
18
|
export const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
|
|
@@ -22,7 +22,7 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
22
22
|
|
|
23
23
|
if (shouldSkipFilters) {
|
|
24
24
|
isMatchingFilters = null;
|
|
25
|
-
} else if (!isRowMatchingFilters || node.
|
|
25
|
+
} else if (!isRowMatchingFilters || node.type === 'footer') {
|
|
26
26
|
isMatchingFilters = true;
|
|
27
27
|
} else {
|
|
28
28
|
const {
|
|
@@ -33,11 +33,15 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
let filteredDescendantCount = 0;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
|
|
37
|
+
if (node.type === 'group') {
|
|
38
|
+
node.children.forEach(childId => {
|
|
39
|
+
const childNode = rowTree[childId];
|
|
40
|
+
const childSubTreeSize = filterTreeNode(childNode, isMatchingFilters ?? isParentMatchingFilters, areAncestorsExpanded && !!node.childrenExpanded);
|
|
41
|
+
filteredDescendantCount += childSubTreeSize;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
let shouldPassFilters;
|
|
42
46
|
|
|
43
47
|
switch (isMatchingFilters) {
|
|
@@ -61,9 +65,9 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
visibleRowsLookup[node.id] = shouldPassFilters && areAncestorsExpanded;
|
|
64
|
-
filteredRowsLookup[node.id] = shouldPassFilters;
|
|
68
|
+
filteredRowsLookup[node.id] = shouldPassFilters; // TODO: Should we keep storing the visibility status of footer independently or rely on the group visibility in the selector ?
|
|
65
69
|
|
|
66
|
-
if (node.footerId != null) {
|
|
70
|
+
if (node.type === 'group' && node.footerId != null) {
|
|
67
71
|
visibleRowsLookup[node.footerId] = shouldPassFilters && areAncestorsExpanded && !!node.childrenExpanded;
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -73,7 +77,7 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
73
77
|
|
|
74
78
|
filteredDescendantCountLookup[node.id] = filteredDescendantCount;
|
|
75
79
|
|
|
76
|
-
if (node.
|
|
80
|
+
if (node.type === 'footer') {
|
|
77
81
|
return filteredDescendantCount;
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useGridApiEventHandler
|
|
2
|
+
import { useGridApiEventHandler } from '@mui/x-data-grid';
|
|
3
3
|
export const useGridTreeData = apiRef => {
|
|
4
4
|
/**
|
|
5
5
|
* EVENTS
|
|
@@ -8,9 +8,7 @@ export const useGridTreeData = apiRef => {
|
|
|
8
8
|
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
|
9
9
|
|
|
10
10
|
if (cellParams.colDef.type === 'treeDataGroup' && event.key === ' ' && !event.shiftKey) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (filteredDescendantCount === 0) {
|
|
11
|
+
if (params.rowNode.type !== 'group') {
|
|
14
12
|
return;
|
|
15
13
|
}
|
|
16
14
|
|
|
@@ -2,13 +2,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["hideDescendantCount"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { gridRowTreeSelector, useFirstRender, GRID_CHECKBOX_SELECTION_FIELD } from '@mui/x-data-grid';
|
|
6
6
|
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor } from '@mui/x-data-grid/internals';
|
|
7
7
|
import { GRID_TREE_DATA_GROUPING_COL_DEF, GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES } from './gridTreeDataGroupColDef';
|
|
8
8
|
import { filterRowTreeFromTreeData, TREE_DATA_STRATEGY } from './gridTreeDataUtils';
|
|
9
9
|
import { GridTreeDataGroupingCell } from '../../../components';
|
|
10
|
-
import {
|
|
10
|
+
import { createRowTree } from '../../../utils/tree/createRowTree';
|
|
11
11
|
import { sortRowTree } from '../../../utils/tree/sortRowTree';
|
|
12
|
+
import { updateRowTree } from '../../../utils/tree/updateRowTree';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
export const useGridTreeDataPreProcessors = (apiRef, props) => {
|
|
14
15
|
const setStrategyAvailability = React.useCallback(() => {
|
|
@@ -69,28 +70,45 @@ export const useGridTreeDataPreProcessors = (apiRef, props) => {
|
|
|
69
70
|
|
|
70
71
|
return columnsState;
|
|
71
72
|
}, [props.treeData, getGroupingColDef]);
|
|
72
|
-
const
|
|
73
|
+
const createRowTreeForTreeData = React.useCallback(params => {
|
|
73
74
|
if (!props.getTreeDataPath) {
|
|
74
75
|
throw new Error('MUI: No getTreeDataPath given.');
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
const
|
|
78
|
+
const getRowTreeBuilderNode = rowId => ({
|
|
78
79
|
id: rowId,
|
|
79
|
-
path: props.getTreeDataPath(params.
|
|
80
|
+
path: props.getTreeDataPath(params.dataRowIdToModelLookup[rowId]).map(key => ({
|
|
80
81
|
key,
|
|
81
82
|
field: null
|
|
82
83
|
}))
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const onDuplicatePath = (firstId, secondId, path) => {
|
|
87
|
+
throw new Error(['MUI: The path returned by `getTreeDataPath` should be unique.', `The rows with id #${firstId} and #${secondId} have the same.`, `Path: ${JSON.stringify(path.map(step => step.key))}.`].join('\n'));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
if (params.updates.type === 'full') {
|
|
91
|
+
return createRowTree({
|
|
92
|
+
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
93
|
+
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
94
|
+
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
95
|
+
groupingName: TREE_DATA_STRATEGY,
|
|
96
|
+
onDuplicatePath
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return updateRowTree({
|
|
101
|
+
nodes: {
|
|
102
|
+
inserted: params.updates.actions.insert.map(getRowTreeBuilderNode),
|
|
103
|
+
modified: params.updates.actions.modify.map(getRowTreeBuilderNode),
|
|
104
|
+
removed: params.updates.actions.remove
|
|
105
|
+
},
|
|
106
|
+
previousTree: params.previousTree,
|
|
107
|
+
previousTreeDepth: params.previousTreeDepths,
|
|
87
108
|
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
88
109
|
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
89
|
-
groupingName: TREE_DATA_STRATEGY
|
|
90
|
-
|
|
91
|
-
throw new Error(['MUI: The path returned by `getTreeDataPath` should be unique.', `The rows with id #${firstId} and #${secondId} have the same.`, `Path: ${JSON.stringify(path.map(step => step.key))}.`].join('\n'));
|
|
92
|
-
}
|
|
93
|
-
}));
|
|
110
|
+
groupingName: TREE_DATA_STRATEGY
|
|
111
|
+
});
|
|
94
112
|
}, [props.getTreeDataPath, props.defaultGroupingExpansionDepth, props.isGroupExpandedByDefault]);
|
|
95
113
|
const filterRows = React.useCallback(params => {
|
|
96
114
|
const rowTree = gridRowTreeSelector(apiRef);
|
|
@@ -104,16 +122,15 @@ export const useGridTreeDataPreProcessors = (apiRef, props) => {
|
|
|
104
122
|
}, [apiRef, props.disableChildrenFiltering]);
|
|
105
123
|
const sortRows = React.useCallback(params => {
|
|
106
124
|
const rowTree = gridRowTreeSelector(apiRef);
|
|
107
|
-
const rowIds = gridRowIdsSelector(apiRef);
|
|
108
125
|
return sortRowTree({
|
|
109
126
|
rowTree,
|
|
110
|
-
rowIds,
|
|
111
127
|
sortRowList: params.sortRowList,
|
|
112
|
-
disableChildrenSorting: props.disableChildrenSorting
|
|
128
|
+
disableChildrenSorting: props.disableChildrenSorting,
|
|
129
|
+
shouldRenderGroupBelowLeaves: false
|
|
113
130
|
});
|
|
114
131
|
}, [apiRef, props.disableChildrenSorting]);
|
|
115
132
|
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
116
|
-
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'rowTreeCreation',
|
|
133
|
+
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'rowTreeCreation', createRowTreeForTreeData);
|
|
117
134
|
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'filtering', filterRows);
|
|
118
135
|
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'sorting', sortRows);
|
|
119
136
|
/**
|
package/modern/index.js
CHANGED
|
@@ -15,5 +15,7 @@ export { useGridTreeDataPreProcessors } from '../hooks/features/treeData/useGrid
|
|
|
15
15
|
export { TREE_DATA_STRATEGY } from '../hooks/features/treeData/gridTreeDataUtils';
|
|
16
16
|
export { useGridRowPinning, rowPinningStateInitializer } from '../hooks/features/rowPinning/useGridRowPinning';
|
|
17
17
|
export { useGridRowPinningPreProcessors, addPinnedRow } from '../hooks/features/rowPinning/useGridRowPinningPreProcessors';
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
18
|
+
export { createRowTree } from '../utils/tree/createRowTree';
|
|
19
|
+
export { updateRowTree } from '../utils/tree/updateRowTree';
|
|
20
|
+
export { sortRowTree } from '../utils/tree/sortRowTree';
|
|
21
|
+
export { insertNodeInTree, removeNodeFromTree } from '../utils/tree/utils';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
|
|
2
|
+
import { buildRootGroup } from '@mui/x-data-grid/internals';
|
|
3
|
+
import { insertDataRowInTree } from './insertDataRowInTree';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Transform a list of rows into a tree structure where each row references its parent and children.
|
|
7
|
+
*/
|
|
8
|
+
export const createRowTree = params => {
|
|
9
|
+
const dataRowIds = [];
|
|
10
|
+
const tree = {
|
|
11
|
+
[GRID_ROOT_GROUP_ID]: buildRootGroup()
|
|
12
|
+
};
|
|
13
|
+
const treeDepths = {};
|
|
14
|
+
|
|
15
|
+
for (let i = 0; i < params.nodes.length; i += 1) {
|
|
16
|
+
const node = params.nodes[i];
|
|
17
|
+
dataRowIds.push(node.id);
|
|
18
|
+
insertDataRowInTree({
|
|
19
|
+
tree,
|
|
20
|
+
id: node.id,
|
|
21
|
+
path: node.path,
|
|
22
|
+
onDuplicatePath: params.onDuplicatePath,
|
|
23
|
+
treeDepths,
|
|
24
|
+
isGroupExpandedByDefault: params.isGroupExpandedByDefault,
|
|
25
|
+
defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
tree,
|
|
31
|
+
treeDepths,
|
|
32
|
+
groupingName: params.groupingName,
|
|
33
|
+
dataRowIds
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getGroupRowIdFromPath } from './
|
|
1
|
+
export { getGroupRowIdFromPath } from './utils';
|