@mui/x-data-grid 7.7.1 → 7.9.0
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 +166 -1
- package/DataGrid/useDataGridComponent.d.ts +0 -1
- package/DataGrid/useDataGridProps.js +9 -2
- package/components/GridFooter.d.ts +1 -1
- package/components/GridLoadingOverlay.d.ts +15 -3
- package/components/GridLoadingOverlay.js +48 -4
- package/components/GridNoResultsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.d.ts +1 -1
- package/components/GridRow.js +2 -1
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridSelectedRowCount.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.d.ts +3 -0
- package/components/GridSkeletonLoadingOverlay.js +181 -0
- package/components/base/GridOverlays.d.ts +11 -1
- package/components/base/GridOverlays.js +25 -39
- package/components/cell/GridActionsCellItem.d.ts +3 -3
- package/components/cell/GridSkeletonCell.d.ts +13 -6
- package/components/cell/GridSkeletonCell.js +61 -19
- package/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridRootStyles.d.ts +0 -1
- package/components/containers/GridRootStyles.js +19 -2
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/virtualization/GridMainContainer.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +7 -5
- package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +14 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/useGridInitialization.d.ts +1 -1
- package/hooks/core/useGridLocaleText.d.ts +1 -1
- package/hooks/core/useGridLoggerFactory.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/hooks/features/editing/useGridCellEditing.d.ts +1 -1
- package/hooks/features/editing/useGridEditing.d.ts +1 -1
- package/hooks/features/editing/useGridRowEditing.d.ts +1 -1
- package/hooks/features/export/serializers/csvSerializer.d.ts +0 -1
- package/hooks/features/export/useGridCsvExport.d.ts +1 -1
- package/hooks/features/export/useGridPrintExport.d.ts +1 -1
- package/hooks/features/export/useGridPrintExport.js +9 -8
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +11 -0
- package/hooks/features/overlays/useGridOverlays.js +35 -0
- package/hooks/features/pagination/gridPaginationUtils.d.ts +1 -1
- package/hooks/features/pagination/index.d.ts +1 -1
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +1 -1
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridRowCount.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
- package/hooks/features/rows/gridRowsInterfaces.d.ts +10 -2
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -1
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsUtils.d.ts +8 -6
- package/hooks/features/rows/gridRowsUtils.js +30 -6
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +39 -21
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/hooks/utils/index.d.ts +0 -1
- package/hooks/utils/index.js +0 -1
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +1 -1
- package/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/hooks/utils/useGridRootProps.d.ts +1 -1
- package/hooks/utils/useGridSelector.d.ts +1 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +1 -0
- package/internals/utils/propValidation.js +1 -1
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridInfiniteLoaderApi.d.ts +0 -1
- package/models/api/gridRowApi.d.ts +14 -0
- package/models/gridColumnGrouping.d.ts +0 -1
- package/models/gridDataSource.d.ts +87 -0
- package/models/gridDataSource.js +1 -0
- package/models/gridRows.d.ts +10 -0
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.ts +7 -2
- package/models/props/DataGridProps.d.ts +2 -0
- package/modern/DataGrid/useDataGridProps.js +9 -2
- package/modern/components/GridLoadingOverlay.js +48 -4
- package/modern/components/GridRow.js +2 -1
- package/modern/components/GridSkeletonLoadingOverlay.js +181 -0
- package/modern/components/base/GridOverlays.js +25 -39
- package/modern/components/cell/GridSkeletonCell.js +61 -19
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/modern/components/containers/GridRootStyles.js +19 -2
- package/modern/components/virtualization/GridVirtualScroller.js +7 -5
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/modern/hooks/features/export/useGridPrintExport.js +9 -8
- package/modern/hooks/features/overlays/useGridOverlays.js +35 -0
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +30 -6
- package/modern/hooks/features/rows/useGridRows.js +39 -21
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/modern/hooks/utils/index.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/models/gridDataSource.js +1 -0
- package/modern/utils/utils.js +10 -2
- package/node/DataGrid/useDataGridProps.js +9 -2
- package/node/components/GridLoadingOverlay.js +48 -4
- package/node/components/GridRow.js +2 -1
- package/node/components/GridSkeletonLoadingOverlay.js +189 -0
- package/node/components/base/GridOverlays.js +25 -39
- package/node/components/cell/GridSkeletonCell.js +60 -18
- package/node/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/node/components/containers/GridRootStyles.js +19 -2
- package/node/components/virtualization/GridVirtualScroller.js +6 -4
- package/node/constants/defaultGridSlotsComponents.js +1 -0
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/node/hooks/features/export/useGridPrintExport.js +9 -8
- package/node/hooks/features/overlays/useGridOverlays.js +42 -0
- package/node/hooks/features/rows/gridRowsSelector.js +2 -1
- package/node/hooks/features/rows/gridRowsUtils.js +31 -6
- package/node/hooks/features/rows/useGridRows.js +37 -19
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/node/hooks/utils/index.js +0 -12
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/internals/utils/propValidation.js +1 -1
- package/node/models/gridDataSource.js +5 -0
- package/node/utils/utils.js +11 -3
- package/package.json +5 -4
- package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +0 -1
- package/utils/domUtils.d.ts +0 -1
- package/utils/getPublicApiRef.d.ts +1 -2
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.js +10 -2
- package/utils/warning.d.ts +1 -1
- package/hooks/utils/useResizeObserver.d.ts +0 -2
- package/hooks/utils/useResizeObserver.js +0 -36
- package/modern/hooks/utils/useResizeObserver.js +0 -36
- package/node/hooks/utils/useResizeObserver.js +0 -44
|
@@ -49,6 +49,7 @@ export function useGridDimensions(apiRef, props) {
|
|
|
49
49
|
const logger = useGridLogger(apiRef, 'useResizeContainer');
|
|
50
50
|
const errorShown = React.useRef(false);
|
|
51
51
|
const rootDimensionsRef = React.useRef(EMPTY_SIZE);
|
|
52
|
+
const dimensionsState = useGridSelector(apiRef, gridDimensionsSelector);
|
|
52
53
|
const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);
|
|
53
54
|
const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
|
|
54
55
|
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
|
@@ -208,26 +209,25 @@ export function useGridDimensions(apiRef, props) {
|
|
|
208
209
|
}
|
|
209
210
|
}, [apiRef, savedSize, updateDimensions]);
|
|
210
211
|
const root = apiRef.current.rootElementRef.current;
|
|
211
|
-
const dimensions = apiRef.current.state.dimensions;
|
|
212
212
|
useEnhancedEffect(() => {
|
|
213
213
|
if (!root) {
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
216
|
const set = (k, v) => root.style.setProperty(k, v);
|
|
217
|
-
set('--DataGrid-width', `${
|
|
218
|
-
set('--DataGrid-hasScrollX', `${Number(
|
|
219
|
-
set('--DataGrid-hasScrollY', `${Number(
|
|
220
|
-
set('--DataGrid-scrollbarSize', `${
|
|
221
|
-
set('--DataGrid-rowWidth', `${
|
|
222
|
-
set('--DataGrid-columnsTotalWidth', `${
|
|
223
|
-
set('--DataGrid-leftPinnedWidth', `${
|
|
224
|
-
set('--DataGrid-rightPinnedWidth', `${
|
|
225
|
-
set('--DataGrid-headerHeight', `${
|
|
226
|
-
set('--DataGrid-headersTotalHeight', `${
|
|
227
|
-
set('--DataGrid-topContainerHeight', `${
|
|
228
|
-
set('--DataGrid-bottomContainerHeight', `${
|
|
229
|
-
set('--height', `${
|
|
230
|
-
}, [root,
|
|
217
|
+
set('--DataGrid-width', `${dimensionsState.viewportOuterSize.width}px`);
|
|
218
|
+
set('--DataGrid-hasScrollX', `${Number(dimensionsState.hasScrollX)}`);
|
|
219
|
+
set('--DataGrid-hasScrollY', `${Number(dimensionsState.hasScrollY)}`);
|
|
220
|
+
set('--DataGrid-scrollbarSize', `${dimensionsState.scrollbarSize}px`);
|
|
221
|
+
set('--DataGrid-rowWidth', `${dimensionsState.rowWidth}px`);
|
|
222
|
+
set('--DataGrid-columnsTotalWidth', `${dimensionsState.columnsTotalWidth}px`);
|
|
223
|
+
set('--DataGrid-leftPinnedWidth', `${dimensionsState.leftPinnedWidth}px`);
|
|
224
|
+
set('--DataGrid-rightPinnedWidth', `${dimensionsState.rightPinnedWidth}px`);
|
|
225
|
+
set('--DataGrid-headerHeight', `${dimensionsState.headerHeight}px`);
|
|
226
|
+
set('--DataGrid-headersTotalHeight', `${dimensionsState.headersTotalHeight}px`);
|
|
227
|
+
set('--DataGrid-topContainerHeight', `${dimensionsState.topContainerHeight}px`);
|
|
228
|
+
set('--DataGrid-bottomContainerHeight', `${dimensionsState.bottomContainerHeight}px`);
|
|
229
|
+
set('--height', `${dimensionsState.rowHeight}px`);
|
|
230
|
+
}, [root, dimensionsState]);
|
|
231
231
|
const isFirstSizing = React.useRef(true);
|
|
232
232
|
const handleResize = React.useCallback(size => {
|
|
233
233
|
rootDimensionsRef.current = size;
|
|
@@ -119,14 +119,15 @@ export const useGridPrintExport = (apiRef, props) => {
|
|
|
119
119
|
gridClone.style.height = `${computedTotalHeight}px`;
|
|
120
120
|
// The height above does not include grid border width, so we need to exclude it
|
|
121
121
|
gridClone.style.boxSizing = 'content-box';
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
if (!normalizeOptions.hideFooter) {
|
|
123
|
+
// the footer is always being placed at the bottom of the page as if all rows are exported
|
|
124
|
+
// so if getRowsToExport is being used to only export a subset of rows then we need to
|
|
125
|
+
// adjust the footer position to be correctly placed at the bottom of the grid
|
|
126
|
+
const gridFooterElement = gridClone.querySelector(`.${gridClasses.footerContainer}`);
|
|
127
|
+
gridFooterElement.style.position = 'absolute';
|
|
128
|
+
gridFooterElement.style.width = '100%';
|
|
129
|
+
gridFooterElement.style.top = `${computedTotalHeight - gridFooterElementHeight}px`;
|
|
130
|
+
}
|
|
130
131
|
|
|
131
132
|
// printDoc.body.appendChild(gridClone); should be enough but a clone isolation bug in Safari
|
|
132
133
|
// prevents us to do it
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useGridSelector } from '../../utils';
|
|
2
|
+
import { useGridApiContext } from '../../utils/useGridApiContext';
|
|
3
|
+
import { useGridRootProps } from '../../utils/useGridRootProps';
|
|
4
|
+
import { gridExpandedRowCountSelector } from '../filter';
|
|
5
|
+
import { gridRowCountSelector, gridRowsLoadingSelector } from '../rows';
|
|
6
|
+
/**
|
|
7
|
+
* Uses the grid state to determine which overlay to display.
|
|
8
|
+
* Returns the active overlay type and the active loading overlay variant.
|
|
9
|
+
*/
|
|
10
|
+
export const useGridOverlays = () => {
|
|
11
|
+
const apiRef = useGridApiContext();
|
|
12
|
+
const rootProps = useGridRootProps();
|
|
13
|
+
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
14
|
+
const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);
|
|
15
|
+
const noRows = totalRowCount === 0;
|
|
16
|
+
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
|
17
|
+
const showNoRowsOverlay = !loading && noRows;
|
|
18
|
+
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
|
19
|
+
let overlayType = null;
|
|
20
|
+
let loadingOverlayVariant = null;
|
|
21
|
+
if (showNoRowsOverlay) {
|
|
22
|
+
overlayType = 'noRowsOverlay';
|
|
23
|
+
}
|
|
24
|
+
if (showNoResultsOverlay) {
|
|
25
|
+
overlayType = 'noResultsOverlay';
|
|
26
|
+
}
|
|
27
|
+
if (loading) {
|
|
28
|
+
overlayType = 'loadingOverlay';
|
|
29
|
+
loadingOverlayVariant = rootProps.slotProps?.loadingOverlay?.[noRows ? 'noRowsVariant' : 'variant'] || null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
overlayType,
|
|
33
|
+
loadingOverlayVariant
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -8,6 +8,7 @@ export const gridTopLevelRowCountSelector = createSelector(gridRowsStateSelector
|
|
|
8
8
|
export const gridRowsLookupSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIdToModelLookup);
|
|
9
9
|
export const gridRowsDataRowIdToIdLookupSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIdToIdLookup);
|
|
10
10
|
export const gridRowTreeSelector = createSelector(gridRowsStateSelector, rows => rows.tree);
|
|
11
|
+
export const gridRowGroupsToFetchSelector = createSelector(gridRowsStateSelector, rows => rows.groupsToFetch);
|
|
11
12
|
export const gridRowGroupingNameSelector = createSelector(gridRowsStateSelector, rows => rows.groupingName);
|
|
12
13
|
export const gridRowTreeDepthsSelector = createSelector(gridRowsStateSelector, rows => rows.treeDepths);
|
|
13
14
|
export const gridRowMaximumTreeDepthSelector = createSelectorMemoized(gridRowsStateSelector, rows => {
|
|
@@ -72,7 +72,8 @@ export const getRowsStateFromCache = ({
|
|
|
72
72
|
rowCountProp = 0,
|
|
73
73
|
loadingProp,
|
|
74
74
|
previousTree,
|
|
75
|
-
previousTreeDepths
|
|
75
|
+
previousTreeDepths,
|
|
76
|
+
previousGroupsToFetch
|
|
76
77
|
}) => {
|
|
77
78
|
const cache = apiRef.current.caches.rows;
|
|
78
79
|
|
|
@@ -81,13 +82,15 @@ export const getRowsStateFromCache = ({
|
|
|
81
82
|
tree: unProcessedTree,
|
|
82
83
|
treeDepths: unProcessedTreeDepths,
|
|
83
84
|
dataRowIds: unProcessedDataRowIds,
|
|
84
|
-
groupingName
|
|
85
|
+
groupingName,
|
|
86
|
+
groupsToFetch = []
|
|
85
87
|
} = apiRef.current.applyStrategyProcessor('rowTreeCreation', {
|
|
86
88
|
previousTree,
|
|
87
89
|
previousTreeDepths,
|
|
88
90
|
updates: cache.updates,
|
|
89
91
|
dataRowIdToIdLookup: cache.dataRowIdToIdLookup,
|
|
90
|
-
dataRowIdToModelLookup: cache.dataRowIdToModelLookup
|
|
92
|
+
dataRowIdToModelLookup: cache.dataRowIdToModelLookup,
|
|
93
|
+
previousGroupsToFetch
|
|
91
94
|
});
|
|
92
95
|
|
|
93
96
|
// 2. Apply the "hydrateRows" pipe-processing.
|
|
@@ -116,7 +119,8 @@ export const getRowsStateFromCache = ({
|
|
|
116
119
|
rowCountProp
|
|
117
120
|
}),
|
|
118
121
|
groupingName,
|
|
119
|
-
loading: loadingProp
|
|
122
|
+
loading: loadingProp,
|
|
123
|
+
groupsToFetch
|
|
120
124
|
});
|
|
121
125
|
};
|
|
122
126
|
export const isAutoGeneratedRow = rowNode => rowNode.type === 'skeletonRow' || rowNode.type === 'footer' || rowNode.type === 'group' && rowNode.isAutoGenerated || rowNode.type === 'pinnedRow' && rowNode.isAutoGenerated;
|
|
@@ -144,7 +148,8 @@ export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) =>
|
|
|
144
148
|
export const updateCacheWithNewRows = ({
|
|
145
149
|
previousCache,
|
|
146
150
|
getRowId,
|
|
147
|
-
updates
|
|
151
|
+
updates,
|
|
152
|
+
groupKeys
|
|
148
153
|
}) => {
|
|
149
154
|
if (previousCache.updates.type === 'full') {
|
|
150
155
|
throw new Error('MUI X: Unable to prepare a partial update if a full update is not applied yet.');
|
|
@@ -168,7 +173,8 @@ export const updateCacheWithNewRows = ({
|
|
|
168
173
|
modify: [...(previousCache.updates.actions.modify ?? [])],
|
|
169
174
|
remove: [...(previousCache.updates.actions.remove ?? [])]
|
|
170
175
|
},
|
|
171
|
-
idToActionLookup: _extends({}, previousCache.updates.idToActionLookup)
|
|
176
|
+
idToActionLookup: _extends({}, previousCache.updates.idToActionLookup),
|
|
177
|
+
groupKeys
|
|
172
178
|
};
|
|
173
179
|
const dataRowIdToModelLookup = _extends({}, previousCache.dataRowIdToModelLookup);
|
|
174
180
|
const dataRowIdToIdLookup = _extends({}, previousCache.dataRowIdToIdLookup);
|
|
@@ -281,4 +287,22 @@ export function calculatePinnedRowsHeight(apiRef) {
|
|
|
281
287
|
export function getMinimalContentHeight(apiRef) {
|
|
282
288
|
const dimensions = gridDimensionsSelector(apiRef.current.state);
|
|
283
289
|
return `var(--DataGrid-overlayHeight, ${2 * dimensions.rowHeight}px)`;
|
|
290
|
+
}
|
|
291
|
+
export function computeRowsUpdates(apiRef, updates, getRowId) {
|
|
292
|
+
const nonPinnedRowsUpdates = [];
|
|
293
|
+
updates.forEach(update => {
|
|
294
|
+
const id = getRowIdFromRowModel(update, getRowId, 'A row was provided without id when calling updateRows():');
|
|
295
|
+
const rowNode = apiRef.current.getRowNode(id);
|
|
296
|
+
if (rowNode?.type === 'pinnedRow') {
|
|
297
|
+
// @ts-ignore because otherwise `release:build` doesn't work
|
|
298
|
+
const pinnedRowsCache = apiRef.current.caches.pinnedRows;
|
|
299
|
+
const prevModel = pinnedRowsCache.idLookup[id];
|
|
300
|
+
if (prevModel) {
|
|
301
|
+
pinnedRowsCache.idLookup[id] = _extends({}, prevModel, update);
|
|
302
|
+
}
|
|
303
|
+
} else {
|
|
304
|
+
nonPinnedRowsUpdates.push(update);
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
return nonPinnedRowsUpdates;
|
|
284
308
|
}
|
|
@@ -2,17 +2,18 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
4
4
|
import { useGridLogger } from '../../utils/useGridLogger';
|
|
5
|
-
import { gridRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridDataRowIdsSelector, gridRowsDataRowIdToIdLookupSelector, gridRowMaximumTreeDepthSelector } from './gridRowsSelector';
|
|
5
|
+
import { gridRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridDataRowIdsSelector, gridRowsDataRowIdToIdLookupSelector, gridRowMaximumTreeDepthSelector, gridRowGroupsToFetchSelector } from './gridRowsSelector';
|
|
6
6
|
import { useTimeout } from '../../utils/useTimeout';
|
|
7
7
|
import { GridSignature, useGridApiEventHandler } from '../../utils/useGridApiEventHandler';
|
|
8
8
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
9
9
|
import { gridSortedRowIdsSelector } from '../sorting/gridSortingSelector';
|
|
10
10
|
import { gridFilteredRowsLookupSelector } from '../filter/gridFilterSelector';
|
|
11
|
-
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutoGeneratedRow, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel } from './gridRowsUtils';
|
|
11
|
+
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutoGeneratedRow, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel, computeRowsUpdates } from './gridRowsUtils';
|
|
12
12
|
import { useGridRegisterPipeApplier } from '../../core/pipeProcessing';
|
|
13
13
|
export const rowsStateInitializer = (state, props, apiRef) => {
|
|
14
|
+
const isDataSourceAvailable = !!props.unstable_dataSource;
|
|
14
15
|
apiRef.current.caches.rows = createRowsInternalCache({
|
|
15
|
-
rows: props.rows,
|
|
16
|
+
rows: isDataSourceAvailable ? [] : props.rows,
|
|
16
17
|
getRowId: props.getRowId,
|
|
17
18
|
loading: props.loading,
|
|
18
19
|
rowCount: props.rowCount
|
|
@@ -21,7 +22,7 @@ export const rowsStateInitializer = (state, props, apiRef) => {
|
|
|
21
22
|
rows: getRowsStateFromCache({
|
|
22
23
|
apiRef,
|
|
23
24
|
rowCountProp: props.rowCount,
|
|
24
|
-
loadingProp: props.loading,
|
|
25
|
+
loadingProp: isDataSourceAvailable ? true : props.loading,
|
|
25
26
|
previousTree: null,
|
|
26
27
|
previousTreeDepths: null
|
|
27
28
|
})
|
|
@@ -82,7 +83,8 @@ export const useGridRows = (apiRef, props) => {
|
|
|
82
83
|
rowCountProp: props.rowCount,
|
|
83
84
|
loadingProp: props.loading,
|
|
84
85
|
previousTree: gridRowTreeSelector(apiRef),
|
|
85
|
-
previousTreeDepths: gridRowTreeDepthsSelector(apiRef)
|
|
86
|
+
previousTreeDepths: gridRowTreeDepthsSelector(apiRef),
|
|
87
|
+
previousGroupsToFetch: gridRowGroupsToFetchSelector(apiRef)
|
|
86
88
|
})
|
|
87
89
|
}));
|
|
88
90
|
apiRef.current.publishEvent('rowsSet');
|
|
@@ -124,21 +126,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
124
126
|
if (props.signature === GridSignature.DataGrid && updates.length > 1) {
|
|
125
127
|
throw new Error(['MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
|
|
126
128
|
}
|
|
127
|
-
const nonPinnedRowsUpdates =
|
|
128
|
-
updates.forEach(update => {
|
|
129
|
-
const id = getRowIdFromRowModel(update, props.getRowId, 'A row was provided without id when calling updateRows():');
|
|
130
|
-
const rowNode = apiRef.current.getRowNode(id);
|
|
131
|
-
if (rowNode?.type === 'pinnedRow') {
|
|
132
|
-
// @ts-ignore because otherwise `release:build` doesn't work
|
|
133
|
-
const pinnedRowsCache = apiRef.current.caches.pinnedRows;
|
|
134
|
-
const prevModel = pinnedRowsCache.idLookup[id];
|
|
135
|
-
if (prevModel) {
|
|
136
|
-
pinnedRowsCache.idLookup[id] = _extends({}, prevModel, update);
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
nonPinnedRowsUpdates.push(update);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
129
|
+
const nonPinnedRowsUpdates = computeRowsUpdates(apiRef, updates, props.getRowId);
|
|
142
130
|
const cache = updateCacheWithNewRows({
|
|
143
131
|
updates: nonPinnedRowsUpdates,
|
|
144
132
|
getRowId: props.getRowId,
|
|
@@ -149,6 +137,31 @@ export const useGridRows = (apiRef, props) => {
|
|
|
149
137
|
throttle: true
|
|
150
138
|
});
|
|
151
139
|
}, [props.signature, props.getRowId, throttledRowsChange, apiRef]);
|
|
140
|
+
const updateServerRows = React.useCallback((updates, groupKeys) => {
|
|
141
|
+
const nonPinnedRowsUpdates = computeRowsUpdates(apiRef, updates, props.getRowId);
|
|
142
|
+
const cache = updateCacheWithNewRows({
|
|
143
|
+
updates: nonPinnedRowsUpdates,
|
|
144
|
+
getRowId: props.getRowId,
|
|
145
|
+
previousCache: apiRef.current.caches.rows,
|
|
146
|
+
groupKeys: groupKeys ?? []
|
|
147
|
+
});
|
|
148
|
+
throttledRowsChange({
|
|
149
|
+
cache,
|
|
150
|
+
throttle: false
|
|
151
|
+
});
|
|
152
|
+
}, [props.getRowId, throttledRowsChange, apiRef]);
|
|
153
|
+
const setLoading = React.useCallback(loading => {
|
|
154
|
+
if (loading === props.loading) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
logger.debug(`Setting loading to ${loading}`);
|
|
158
|
+
apiRef.current.setState(state => _extends({}, state, {
|
|
159
|
+
rows: _extends({}, state.rows, {
|
|
160
|
+
loading
|
|
161
|
+
})
|
|
162
|
+
}));
|
|
163
|
+
apiRef.current.caches.rows.loadingPropBeforePartialUpdates = loading;
|
|
164
|
+
}, [props.loading, apiRef, logger]);
|
|
152
165
|
const getRowModels = React.useCallback(() => {
|
|
153
166
|
const dataRows = gridDataRowIdsSelector(apiRef);
|
|
154
167
|
const idRowsLookup = gridRowsLookupSelector(apiRef);
|
|
@@ -303,6 +316,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
303
316
|
}, [apiRef, props.signature, props.getRowId]);
|
|
304
317
|
const rowApi = {
|
|
305
318
|
getRow,
|
|
319
|
+
setLoading,
|
|
306
320
|
getRowId,
|
|
307
321
|
getRowModels,
|
|
308
322
|
getRowsCount,
|
|
@@ -318,6 +332,9 @@ export const useGridRows = (apiRef, props) => {
|
|
|
318
332
|
setRowChildrenExpansion,
|
|
319
333
|
getRowGroupChildren
|
|
320
334
|
};
|
|
335
|
+
const rowProPrivateApi = {
|
|
336
|
+
updateServerRows
|
|
337
|
+
};
|
|
321
338
|
|
|
322
339
|
/**
|
|
323
340
|
* EVENTS
|
|
@@ -392,6 +409,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
392
409
|
useGridRegisterPipeApplier(apiRef, 'hydrateRows', applyHydrateRowsProcessor);
|
|
393
410
|
useGridApiMethod(apiRef, rowApi, 'public');
|
|
394
411
|
useGridApiMethod(apiRef, rowProApi, props.signature === GridSignature.DataGrid ? 'private' : 'public');
|
|
412
|
+
useGridApiMethod(apiRef, rowProPrivateApi, 'private');
|
|
395
413
|
|
|
396
414
|
// The effect do not track any value defined synchronously during the 1st render by hooks called after `useGridRows`
|
|
397
415
|
// As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one
|
|
@@ -436,7 +454,7 @@ export const useGridRows = (apiRef, props) => {
|
|
|
436
454
|
return;
|
|
437
455
|
}
|
|
438
456
|
}
|
|
439
|
-
logger.debug(`Updating all rows, new length ${props.rows
|
|
457
|
+
logger.debug(`Updating all rows, new length ${props.rows?.length}`);
|
|
440
458
|
throttledRowsChange({
|
|
441
459
|
cache: createRowsInternalCache({
|
|
442
460
|
rows: props.rows,
|
|
@@ -4,11 +4,11 @@ import * as ReactDOM from 'react-dom';
|
|
|
4
4
|
import { unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
5
5
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
6
6
|
import useTimeout from '@mui/utils/useTimeout';
|
|
7
|
+
import { useResizeObserver } from '@mui/x-internals/useResizeObserver';
|
|
7
8
|
import { useTheme } from '@mui/material/styles';
|
|
8
9
|
import { useGridPrivateApiContext } from '../../utils/useGridPrivateApiContext';
|
|
9
10
|
import { useGridRootProps } from '../../utils/useGridRootProps';
|
|
10
11
|
import { useGridSelector } from '../../utils/useGridSelector';
|
|
11
|
-
import { useResizeObserver } from '../../utils/useResizeObserver';
|
|
12
12
|
import { useRunOnce } from '../../utils/useRunOnce';
|
|
13
13
|
import { gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnPositionsSelector, gridHasColSpanSelector } from '../columns/gridColumnsSelector';
|
|
14
14
|
import { gridDimensionsSelector } from '../dimensions/gridDimensionsSelectors';
|
package/modern/index.js
CHANGED
|
@@ -55,6 +55,7 @@ export { useGridInitializeState } from '../hooks/utils/useGridInitializeState';
|
|
|
55
55
|
export { getColumnsToExport, defaultGetRowsToExport } from '../hooks/features/export/utils';
|
|
56
56
|
export * from '../utils/createControllablePromise';
|
|
57
57
|
export { createSelector, createSelectorMemoized } from '../utils/createSelector';
|
|
58
|
+
export { gridRowGroupsToFetchSelector } from '../hooks/features/rows/gridRowsSelector';
|
|
58
59
|
export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from '../utils/domUtils';
|
|
59
60
|
export { isNavigationKey, isPasteShortcut } from '../utils/keyboardUtils';
|
|
60
61
|
export * from '../utils/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNumber } from '../../utils/utils';
|
|
2
2
|
import { GridSignature } from '../../hooks/utils/useGridApiEventHandler';
|
|
3
|
-
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
3
|
+
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.unstable_dataSource && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
4
4
|
const warnedOnceCache = new Set();
|
|
5
5
|
function warnOnce(message) {
|
|
6
6
|
if (!warnedOnceCache.has(message)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/modern/utils/utils.js
CHANGED
|
@@ -172,9 +172,17 @@ function mulberry32(a) {
|
|
|
172
172
|
/* eslint-enable */
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Create a random number generator from a seed. The seed
|
|
178
|
+
* ensures that the random number generator produces the
|
|
179
|
+
* same sequence of 'random' numbers on every render. It
|
|
180
|
+
* returns a function that generates a random number between
|
|
181
|
+
* a specified min and max.
|
|
182
|
+
*/
|
|
183
|
+
export function createRandomNumberGenerator(seed) {
|
|
176
184
|
const random = mulberry32(seed);
|
|
177
|
-
return () => min + (max - min) * random();
|
|
185
|
+
return (min, max) => min + (max - min) * random();
|
|
178
186
|
}
|
|
179
187
|
export function deepClone(obj) {
|
|
180
188
|
if (typeof structuredClone === 'function') {
|
|
@@ -94,9 +94,16 @@ const useDataGridProps = inProps => {
|
|
|
94
94
|
defaultSlots,
|
|
95
95
|
slots: themedProps.slots
|
|
96
96
|
}), [themedProps.slots]);
|
|
97
|
-
|
|
97
|
+
const injectDefaultProps = React.useMemo(() => {
|
|
98
|
+
return Object.keys(DATA_GRID_PROPS_DEFAULT_VALUES).reduce((acc, key) => {
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
acc[key] = themedProps[key] ?? DATA_GRID_PROPS_DEFAULT_VALUES[key];
|
|
101
|
+
return acc;
|
|
102
|
+
}, {});
|
|
103
|
+
}, [themedProps]);
|
|
104
|
+
return React.useMemo(() => (0, _extends2.default)({}, themedProps, injectDefaultProps, {
|
|
98
105
|
localeText,
|
|
99
106
|
slots
|
|
100
|
-
}, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots]);
|
|
107
|
+
}, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots, injectDefaultProps]);
|
|
101
108
|
};
|
|
102
109
|
exports.useDataGridProps = useDataGridProps;
|
|
@@ -6,18 +6,52 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.GridLoadingOverlay = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _LinearProgress = _interopRequireDefault(require("@mui/material/LinearProgress"));
|
|
11
13
|
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
12
14
|
var _GridOverlay = require("./containers/GridOverlay");
|
|
15
|
+
var _GridSkeletonLoadingOverlay = require("./GridSkeletonLoadingOverlay");
|
|
16
|
+
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
17
|
+
var _hooks = require("../hooks");
|
|
13
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
const _excluded = ["variant", "noRowsVariant", "style"];
|
|
14
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
const LOADING_VARIANTS = {
|
|
23
|
+
'circular-progress': {
|
|
24
|
+
component: _CircularProgress.default,
|
|
25
|
+
style: {}
|
|
26
|
+
},
|
|
27
|
+
'linear-progress': {
|
|
28
|
+
component: _LinearProgress.default,
|
|
29
|
+
style: {
|
|
30
|
+
display: 'block'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
skeleton: {
|
|
34
|
+
component: _GridSkeletonLoadingOverlay.GridSkeletonLoadingOverlay,
|
|
35
|
+
style: {
|
|
36
|
+
display: 'block'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
16
40
|
const GridLoadingOverlay = exports.GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOverlay(props, ref) {
|
|
41
|
+
const {
|
|
42
|
+
variant = 'circular-progress',
|
|
43
|
+
noRowsVariant = 'circular-progress',
|
|
44
|
+
style
|
|
45
|
+
} = props,
|
|
46
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
47
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
48
|
+
const rowsCount = (0, _hooks.useGridSelector)(apiRef, _hooks.gridRowCountSelector);
|
|
49
|
+
const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];
|
|
17
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridOverlay.GridOverlay, (0, _extends2.default)({
|
|
18
|
-
ref: ref
|
|
19
|
-
|
|
20
|
-
|
|
51
|
+
ref: ref,
|
|
52
|
+
style: (0, _extends2.default)({}, activeVariant.style, style)
|
|
53
|
+
}, other, {
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(activeVariant.component, {})
|
|
21
55
|
}));
|
|
22
56
|
});
|
|
23
57
|
process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
@@ -25,5 +59,15 @@ process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
|
25
59
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
26
60
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
27
61
|
// ----------------------------------------------------------------------
|
|
28
|
-
|
|
62
|
+
/**
|
|
63
|
+
* The variant of the overlay when no rows are displayed.
|
|
64
|
+
* @default 'circular-progress'
|
|
65
|
+
*/
|
|
66
|
+
noRowsVariant: _propTypes.default.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
|
|
67
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
68
|
+
/**
|
|
69
|
+
* The variant of the overlay.
|
|
70
|
+
* @default 'circular-progress'
|
|
71
|
+
*/
|
|
72
|
+
variant: _propTypes.default.oneOf(['circular-progress', 'linear-progress', 'skeleton'])
|
|
29
73
|
} : void 0;
|
|
@@ -258,10 +258,11 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
258
258
|
const pinnedOffset = (0, _getPinnedCellOffset.getPinnedCellOffset)(_GridCell.gridPinnedColumnPositionLookup[pinnedPosition], column.computedWidth, indexRelativeToAllColumns, columnPositions, dimensions);
|
|
259
259
|
if (rowNode?.type === 'skeletonRow') {
|
|
260
260
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(slots.skeletonCell, {
|
|
261
|
+
type: column.type,
|
|
261
262
|
width: width,
|
|
262
263
|
height: rowHeight,
|
|
263
264
|
field: column.field,
|
|
264
|
-
align: column.align
|
|
265
|
+
align: column.align
|
|
265
266
|
}, column.field);
|
|
266
267
|
}
|
|
267
268
|
const editCellState = editRowsState[rowId]?.[column.field] ?? null;
|