@mui/x-data-grid 7.29.2 → 7.29.3
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 +38 -0
- package/hooks/features/editing/useGridRowEditing.js +7 -6
- package/hooks/features/rowSelection/utils.js +1 -1
- package/index.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -6
- package/modern/hooks/features/rowSelection/utils.js +1 -1
- package/modern/index.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +6 -5
- package/node/hooks/features/rowSelection/utils.js +1 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.29.3
|
|
7
|
+
|
|
8
|
+
_May 8, 2025_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
|
|
14
|
+
Team members who have contributed to this release:
|
|
15
|
+
@arminmeh, @LukasTy, and @MBilalShafi.
|
|
16
|
+
|
|
17
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@7.29.3`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Ignore `preProcessEditCellProps` for non-editable columns when starting a row update (#17734) @arminmeh
|
|
24
|
+
- [DataGrid] Avoid applying row selection propagation on filtered rows (#17742) @MBilalShafi
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@7.29.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@7.29.3`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@7.29.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@7.29.3`.
|
|
33
|
+
|
|
34
|
+
### Date and Time Pickers
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-date-pickers@7.29.3`
|
|
37
|
+
|
|
38
|
+
- [DateTimePicker] Fix focus behavior on desktop variant (#17730) @LukasTy
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-date-pickers-pro@7.29.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-date-pickers@7.29.3`.
|
|
43
|
+
|
|
6
44
|
## 7.29.2
|
|
7
45
|
|
|
8
46
|
_May 1, 2025_
|
|
@@ -11,7 +11,7 @@ import { GridEditModes, GridRowModes } from "../../../models/gridEditRowModel.js
|
|
|
11
11
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
12
12
|
import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "./gridEditingSelectors.js";
|
|
13
13
|
import { isPrintableKey, isPasteShortcut } from "../../../utils/keyboardUtils.js";
|
|
14
|
-
import {
|
|
14
|
+
import { gridColumnDefinitionsSelector, gridVisibleColumnFieldsSelector } from "../columns/gridColumnsSelector.js";
|
|
15
15
|
import { gridRowsLookupSelector } from "../rows/gridRowsSelector.js";
|
|
16
16
|
import { deepClone } from "../../../utils/utils.js";
|
|
17
17
|
import { GridRowEditStopReasons, GridRowEditStartReasons } from "../../../models/params/gridRowParams.js";
|
|
@@ -313,8 +313,9 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
313
313
|
initialValue
|
|
314
314
|
} = params;
|
|
315
315
|
const row = apiRef.current.getRow(id);
|
|
316
|
-
const
|
|
317
|
-
const newProps =
|
|
316
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
317
|
+
const newProps = columns.reduce((acc, col) => {
|
|
318
|
+
const field = col.field;
|
|
318
319
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
319
320
|
if (!cellParams.isEditable) {
|
|
320
321
|
return acc;
|
|
@@ -331,7 +332,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
331
332
|
acc[field] = {
|
|
332
333
|
value: newValue,
|
|
333
334
|
error: false,
|
|
334
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
335
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
335
336
|
};
|
|
336
337
|
return acc;
|
|
337
338
|
}, {});
|
|
@@ -340,8 +341,8 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
340
341
|
if (fieldToFocus) {
|
|
341
342
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
-
const
|
|
344
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
345
|
+
const field = column.field;
|
|
345
346
|
const value = apiRef.current.getCellValue(id, field);
|
|
346
347
|
const newValue = deleteValue ? getDefaultCellValue(column) : initialValue ?? value;
|
|
347
348
|
Promise.resolve(column.preProcessEditCellProps({
|
|
@@ -97,7 +97,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
|
|
|
97
97
|
export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, selectedIds = new Set(gridRowSelectionStateSelector(apiRef.current.state))) => {
|
|
98
98
|
const filteredRows = gridFilteredRowsLookupSelector(apiRef);
|
|
99
99
|
const selectedDescendants = new Set([]);
|
|
100
|
-
if (!autoSelectDescendants && !autoSelectParents) {
|
|
100
|
+
if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
if (autoSelectDescendants) {
|
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { GridEditModes, GridRowModes } from "../../../models/gridEditRowModel.js
|
|
|
11
11
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
12
12
|
import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "./gridEditingSelectors.js";
|
|
13
13
|
import { isPrintableKey, isPasteShortcut } from "../../../utils/keyboardUtils.js";
|
|
14
|
-
import {
|
|
14
|
+
import { gridColumnDefinitionsSelector, gridVisibleColumnFieldsSelector } from "../columns/gridColumnsSelector.js";
|
|
15
15
|
import { gridRowsLookupSelector } from "../rows/gridRowsSelector.js";
|
|
16
16
|
import { deepClone } from "../../../utils/utils.js";
|
|
17
17
|
import { GridRowEditStopReasons, GridRowEditStartReasons } from "../../../models/params/gridRowParams.js";
|
|
@@ -313,8 +313,9 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
313
313
|
initialValue
|
|
314
314
|
} = params;
|
|
315
315
|
const row = apiRef.current.getRow(id);
|
|
316
|
-
const
|
|
317
|
-
const newProps =
|
|
316
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
317
|
+
const newProps = columns.reduce((acc, col) => {
|
|
318
|
+
const field = col.field;
|
|
318
319
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
319
320
|
if (!cellParams.isEditable) {
|
|
320
321
|
return acc;
|
|
@@ -331,7 +332,7 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
331
332
|
acc[field] = {
|
|
332
333
|
value: newValue,
|
|
333
334
|
error: false,
|
|
334
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
335
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
335
336
|
};
|
|
336
337
|
return acc;
|
|
337
338
|
}, {});
|
|
@@ -340,8 +341,8 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
340
341
|
if (fieldToFocus) {
|
|
341
342
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
-
const
|
|
344
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
345
|
+
const field = column.field;
|
|
345
346
|
const value = apiRef.current.getCellValue(id, field);
|
|
346
347
|
const newValue = deleteValue ? getDefaultCellValue(column) : initialValue ?? value;
|
|
347
348
|
Promise.resolve(column.preProcessEditCellProps({
|
|
@@ -97,7 +97,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
|
|
|
97
97
|
export const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, selectedIds = new Set(gridRowSelectionStateSelector(apiRef.current.state))) => {
|
|
98
98
|
const filteredRows = gridFilteredRowsLookupSelector(apiRef);
|
|
99
99
|
const selectedDescendants = new Set([]);
|
|
100
|
-
if (!autoSelectDescendants && !autoSelectParents) {
|
|
100
|
+
if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
if (autoSelectDescendants) {
|
package/modern/index.js
CHANGED
|
@@ -321,8 +321,9 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
321
321
|
initialValue
|
|
322
322
|
} = params;
|
|
323
323
|
const row = apiRef.current.getRow(id);
|
|
324
|
-
const
|
|
325
|
-
const newProps =
|
|
324
|
+
const columns = (0, _gridColumnsSelector.gridColumnDefinitionsSelector)(apiRef);
|
|
325
|
+
const newProps = columns.reduce((acc, col) => {
|
|
326
|
+
const field = col.field;
|
|
326
327
|
const cellParams = apiRef.current.getCellParams(id, field);
|
|
327
328
|
if (!cellParams.isEditable) {
|
|
328
329
|
return acc;
|
|
@@ -339,7 +340,7 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
339
340
|
acc[field] = {
|
|
340
341
|
value: newValue,
|
|
341
342
|
error: false,
|
|
342
|
-
isProcessingProps: !!column.preProcessEditCellProps && deleteValue
|
|
343
|
+
isProcessingProps: column.editable && !!column.preProcessEditCellProps && deleteValue
|
|
343
344
|
};
|
|
344
345
|
return acc;
|
|
345
346
|
}, {});
|
|
@@ -348,8 +349,8 @@ const useGridRowEditing = (apiRef, props) => {
|
|
|
348
349
|
if (fieldToFocus) {
|
|
349
350
|
apiRef.current.setCellFocus(id, fieldToFocus);
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
-
const
|
|
352
|
+
columns.filter(column => column.editable && !!column.preProcessEditCellProps && deleteValue).forEach(column => {
|
|
353
|
+
const field = column.field;
|
|
353
354
|
const value = apiRef.current.getCellValue(id, field);
|
|
354
355
|
const newValue = deleteValue ? (0, _utils3.getDefaultCellValue)(column) : initialValue ?? value;
|
|
355
356
|
Promise.resolve(column.preProcessEditCellProps({
|
|
@@ -105,7 +105,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
|
|
|
105
105
|
const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, selectedIds = new Set((0, _gridRowSelectionSelector.gridRowSelectionStateSelector)(apiRef.current.state))) => {
|
|
106
106
|
const filteredRows = (0, _gridFilterSelector.gridFilteredRowsLookupSelector)(apiRef);
|
|
107
107
|
const selectedDescendants = new Set([]);
|
|
108
|
-
if (!autoSelectDescendants && !autoSelectParents) {
|
|
108
|
+
if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
if (autoSelectDescendants) {
|
package/node/index.js
CHANGED