@mui/x-data-grid 6.19.1 → 6.19.2
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 +35 -0
- package/components/GridPagination.d.ts +4 -4
- package/components/GridRow.js +0 -1
- package/components/base/GridOverlays.js +0 -2
- package/components/cell/GridActionsCell.js +0 -1
- package/components/cell/GridActionsCellItem.d.ts +5 -5
- package/components/panel/GridPanel.d.ts +3 -3
- package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
- package/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/components/virtualization/GridVirtualScroller.js +0 -1
- package/hooks/features/editing/useGridCellEditing.js +0 -2
- package/hooks/features/editing/useGridRowEditing.js +0 -1
- package/hooks/features/rows/gridRowsUtils.js +4 -1
- package/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/index.js +1 -1
- package/legacy/colDef/gridDefaultColumnTypes.js +2 -3
- package/legacy/components/GridPagination.js +3 -4
- package/legacy/components/GridRow.js +0 -1
- package/legacy/components/base/GridOverlays.js +0 -2
- package/legacy/components/cell/GridActionsCell.js +0 -1
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +4 -5
- package/legacy/components/containers/GridRootStyles.js +69 -70
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +8 -5
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +0 -2
- package/legacy/hooks/features/editing/useGridRowEditing.js +0 -1
- package/legacy/hooks/features/rows/gridRowsUtils.js +4 -1
- package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/locales/coreLocales.js +1 -0
- package/legacy/locales/plPL.js +0 -1
- package/legacy/utils/utils.js +0 -1
- package/locales/coreLocales.js +1 -0
- package/locales/plPL.js +0 -1
- package/modern/components/GridRow.js +0 -1
- package/modern/components/base/GridOverlays.js +0 -2
- package/modern/components/cell/GridActionsCell.js +0 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/modern/components/virtualization/GridVirtualScroller.js +0 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +0 -2
- package/modern/hooks/features/editing/useGridRowEditing.js +0 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +4 -1
- package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/modern/index.js +1 -1
- package/modern/locales/coreLocales.js +1 -0
- package/modern/locales/plPL.js +0 -1
- package/modern/utils/utils.js +0 -1
- package/node/components/GridRow.js +0 -1
- package/node/components/base/GridOverlays.js +0 -2
- package/node/components/cell/GridActionsCell.js +0 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/node/components/virtualization/GridVirtualScroller.js +0 -1
- package/node/hooks/features/editing/useGridCellEditing.js +0 -2
- package/node/hooks/features/editing/useGridRowEditing.js +0 -1
- package/node/hooks/features/rows/gridRowsUtils.js +4 -1
- package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/node/index.js +1 -1
- package/node/locales/plPL.js +0 -1
- package/node/utils/utils.js +0 -1
- package/package.json +1 -1
- package/utils/utils.js +0 -1
|
@@ -239,7 +239,6 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
239
239
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
240
240
|
return; // The prop always win
|
|
241
241
|
}
|
|
242
|
-
|
|
243
242
|
setRowModesModel(newModel);
|
|
244
243
|
rowModesModelRef.current = newModel;
|
|
245
244
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -131,7 +131,10 @@ export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) =>
|
|
|
131
131
|
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
|
132
132
|
validDescendants.push(child);
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
135
|
+
for (let j = 0; j < childDescendants.length; j += 1) {
|
|
136
|
+
validDescendants.push(childDescendants[j]);
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
if (!skipAutoGeneratedRows && node.footerId != null) {
|
|
137
140
|
validDescendants.push(node.footerId);
|
|
@@ -550,7 +550,6 @@ export const useGridVirtualScroller = props => {
|
|
|
550
550
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
551
551
|
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
552
552
|
}
|
|
553
|
-
|
|
554
553
|
return size;
|
|
555
554
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
556
555
|
React.useEffect(() => {
|
package/modern/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// This allows not to bump the minimal version of `@mui/material` in peerDependencies which results
|
|
4
4
|
// in broader compatibility between the packages.
|
|
5
5
|
// See https://github.com/mui/mui-x/pull/7646#issuecomment-1404605556 for additional context.
|
|
6
|
+
|
|
6
7
|
export const beBYCore = {
|
|
7
8
|
components: {
|
|
8
9
|
MuiTablePagination: {
|
package/modern/locales/plPL.js
CHANGED
package/modern/utils/utils.js
CHANGED
|
@@ -40,7 +40,6 @@ const GridOverlayWrapperRoot = (0, _system.styled)('div', {
|
|
|
40
40
|
zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel
|
|
41
41
|
: 4 // Should be above pinned columns and detail panel
|
|
42
42
|
}));
|
|
43
|
-
|
|
44
43
|
const GridOverlayWrapperInner = (0, _system.styled)('div', {
|
|
45
44
|
name: 'MuiDataGrid',
|
|
46
45
|
slot: 'OverlayWrapperInner',
|
|
@@ -71,7 +70,6 @@ function GridOverlayWrapper(props) {
|
|
|
71
70
|
if (rootProps.autoHeight && height === 0) {
|
|
72
71
|
height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
73
72
|
}
|
|
74
|
-
|
|
75
73
|
const classes = useUtilityClasses((0, _extends2.default)({}, props, {
|
|
76
74
|
classes: rootProps.classes
|
|
77
75
|
}));
|
|
@@ -135,7 +135,6 @@ function GridActionsCell(props) {
|
|
|
135
135
|
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
136
136
|
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
137
137
|
}
|
|
138
|
-
|
|
139
138
|
if (newIndex !== focusedButtonIndex) {
|
|
140
139
|
event.preventDefault(); // Prevent scrolling
|
|
141
140
|
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
@@ -132,12 +132,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
132
132
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
133
133
|
* @param {any[]} values The new values passed to the quick filter model
|
|
134
134
|
* @returns {string} The string to display in the text field
|
|
135
|
+
* @default (values: string[]) => values.join(' ')
|
|
135
136
|
*/
|
|
136
137
|
quickFilterFormatter: _propTypes.default.func,
|
|
137
138
|
/**
|
|
138
139
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
139
140
|
* @param {string} input The value entered by the user
|
|
140
141
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
142
|
+
* @default (searchText: string) => searchText
|
|
143
|
+
* .split(' ')
|
|
144
|
+
* .filter((word) => word !== '')
|
|
141
145
|
*/
|
|
142
146
|
quickFilterParser: _propTypes.default.func
|
|
143
147
|
} : void 0;
|
|
@@ -38,7 +38,6 @@ const VirtualScrollerRoot = (0, _system.styled)('div', {
|
|
|
38
38
|
},
|
|
39
39
|
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
40
40
|
});
|
|
41
|
-
|
|
42
41
|
const GridVirtualScroller = exports.GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
43
42
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
44
43
|
const classes = useUtilityClasses(rootProps);
|
|
@@ -90,7 +90,6 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
90
90
|
reason = event.shiftKey ? _gridEditCellParams.GridCellEditStopReasons.shiftTabKeyDown : _gridEditCellParams.GridCellEditStopReasons.tabKeyDown;
|
|
91
91
|
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
92
92
|
}
|
|
93
|
-
|
|
94
93
|
if (reason) {
|
|
95
94
|
const newParams = (0, _extends2.default)({}, params, {
|
|
96
95
|
reason
|
|
@@ -184,7 +183,6 @@ const useGridCellEditing = (apiRef, props) => {
|
|
|
184
183
|
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
|
185
184
|
return; // The prop always win
|
|
186
185
|
}
|
|
187
|
-
|
|
188
186
|
setCellModesModel(newModel);
|
|
189
187
|
cellModesModelRef.current = newModel;
|
|
190
188
|
apiRef.current.publishEvent('cellModesModelChange', newModel);
|
|
@@ -248,7 +248,6 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
248
248
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
249
249
|
return; // The prop always win
|
|
250
250
|
}
|
|
251
|
-
|
|
252
251
|
setRowModesModel(newModel);
|
|
253
252
|
rowModesModelRef.current = newModel;
|
|
254
253
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -149,7 +149,10 @@ const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) => {
|
|
|
149
149
|
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
|
150
150
|
validDescendants.push(child);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
|
153
|
+
for (let j = 0; j < childDescendants.length; j += 1) {
|
|
154
|
+
validDescendants.push(childDescendants[j]);
|
|
155
|
+
}
|
|
153
156
|
}
|
|
154
157
|
if (!skipAutoGeneratedRows && node.footerId != null) {
|
|
155
158
|
validDescendants.push(node.footerId);
|
|
@@ -561,7 +561,6 @@ const useGridVirtualScroller = props => {
|
|
|
561
561
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
562
562
|
size.height = (0, _gridRowsUtils.getMinimalContentHeight)(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
563
563
|
}
|
|
564
|
-
|
|
565
564
|
return size;
|
|
566
565
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
567
566
|
React.useEffect(() => {
|
package/node/index.js
CHANGED
package/node/locales/plPL.js
CHANGED
package/node/utils/utils.js
CHANGED
package/package.json
CHANGED