@mui/x-data-grid 9.3.0 → 9.5.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +296 -0
  2. package/colDef/gridColumnTypesRegistry.d.mts +8 -0
  3. package/colDef/gridColumnTypesRegistry.d.ts +8 -0
  4. package/colDef/gridColumnTypesRegistry.js +44 -0
  5. package/colDef/gridColumnTypesRegistry.mjs +34 -0
  6. package/colDef/gridDefaultColumnTypes.d.mts +1 -1
  7. package/colDef/gridDefaultColumnTypes.d.ts +1 -1
  8. package/colDef/gridDefaultColumnTypes.js +11 -23
  9. package/colDef/gridDefaultColumnTypes.mjs +4 -22
  10. package/components/GridRow.js +9 -1
  11. package/components/GridRow.mjs +9 -1
  12. package/components/cell/GridActionsCell.js +1 -1
  13. package/components/cell/GridActionsCell.mjs +1 -1
  14. package/components/cell/GridActionsCellItem.js +1 -1
  15. package/components/cell/GridActionsCellItem.mjs +1 -1
  16. package/components/cell/GridLongTextCell.js +2 -0
  17. package/components/cell/GridLongTextCell.mjs +2 -0
  18. package/components/cell/GridSkeletonCell.d.mts +2 -1
  19. package/components/cell/GridSkeletonCell.d.ts +2 -1
  20. package/components/cell/GridSkeletonCell.js +8 -3
  21. package/components/cell/GridSkeletonCell.mjs +8 -3
  22. package/components/containers/GridRootStyles.js +29 -0
  23. package/components/containers/GridRootStyles.mjs +29 -0
  24. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -4
  25. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +2 -4
  26. package/components/panel/filterPanel/filterPanelUtils.d.mts +3 -2
  27. package/components/panel/filterPanel/filterPanelUtils.d.ts +3 -2
  28. package/components/panel/filterPanel/filterPanelUtils.js +4 -0
  29. package/components/panel/filterPanel/filterPanelUtils.mjs +3 -0
  30. package/constants/cssVariables.d.mts +3 -0
  31. package/constants/cssVariables.d.ts +3 -0
  32. package/constants/cssVariables.js +2 -1
  33. package/constants/cssVariables.mjs +2 -1
  34. package/constants/gridClasses.d.mts +48 -0
  35. package/constants/gridClasses.d.ts +48 -0
  36. package/constants/gridClasses.js +1 -1
  37. package/constants/gridClasses.mjs +1 -1
  38. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +17 -1
  39. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +17 -1
  40. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
  41. package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -1
  42. package/hooks/core/useGridProps.js +5 -3
  43. package/hooks/core/useGridProps.mjs +5 -3
  44. package/hooks/core/useGridVirtualizer.d.mts +10 -10
  45. package/hooks/core/useGridVirtualizer.d.ts +10 -10
  46. package/hooks/features/columns/gridColumnsUtils.js +18 -10
  47. package/hooks/features/columns/gridColumnsUtils.mjs +19 -11
  48. package/hooks/features/columns/useGridColumns.js +11 -0
  49. package/hooks/features/columns/useGridColumns.mjs +11 -0
  50. package/hooks/features/dataSource/models.d.mts +1 -1
  51. package/hooks/features/dataSource/models.d.ts +1 -1
  52. package/hooks/features/dataSource/useGridDataSourceBase.d.mts +2 -2
  53. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +2 -2
  54. package/hooks/features/dataSource/useGridDataSourceBase.js +31 -19
  55. package/hooks/features/dataSource/useGridDataSourceBase.mjs +31 -19
  56. package/hooks/features/dataSource/utils.d.mts +1 -0
  57. package/hooks/features/dataSource/utils.d.ts +1 -0
  58. package/hooks/features/dataSource/utils.js +1 -0
  59. package/hooks/features/dataSource/utils.mjs +1 -0
  60. package/hooks/features/editing/useGridCellEditing.js +1 -1
  61. package/hooks/features/editing/useGridCellEditing.mjs +1 -1
  62. package/hooks/features/editing/useGridRowEditing.js +1 -1
  63. package/hooks/features/editing/useGridRowEditing.mjs +1 -1
  64. package/hooks/features/export/serializers/csvSerializer.js +3 -1
  65. package/hooks/features/export/serializers/csvSerializer.mjs +3 -1
  66. package/hooks/features/filter/gridFilterUtils.js +5 -3
  67. package/hooks/features/filter/gridFilterUtils.mjs +5 -3
  68. package/hooks/features/listView/useGridListView.js +1 -1
  69. package/hooks/features/listView/useGridListView.mjs +1 -1
  70. package/hooks/features/sorting/gridSortingUtils.js +3 -1
  71. package/hooks/features/sorting/gridSortingUtils.mjs +3 -1
  72. package/hooks/features/virtualization/gridVirtualizationSelectors.d.mts +1 -1
  73. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
  74. package/hooks/utils/useGridSelector.js +26 -23
  75. package/hooks/utils/useGridSelector.mjs +25 -23
  76. package/index.js +1 -1
  77. package/index.mjs +1 -1
  78. package/internals/index.d.mts +9 -4
  79. package/internals/index.d.ts +9 -4
  80. package/internals/index.js +62 -2
  81. package/internals/index.mjs +8 -4
  82. package/internals/utils/propValidation.js +3 -0
  83. package/internals/utils/propValidation.mjs +3 -0
  84. package/material/augmentation.d.mts +4 -0
  85. package/material/augmentation.d.ts +4 -0
  86. package/material/index.js +38 -24
  87. package/material/index.mjs +38 -24
  88. package/material/variables.js +2 -1
  89. package/material/variables.mjs +2 -1
  90. package/models/colDef/gridColDef.d.mts +35 -3
  91. package/models/colDef/gridColDef.d.ts +35 -3
  92. package/models/colDef/gridColType.d.mts +1 -0
  93. package/models/colDef/gridColType.d.ts +1 -0
  94. package/models/colDef/gridColumnTypesRecord.d.mts +1 -1
  95. package/models/colDef/gridColumnTypesRecord.d.ts +1 -1
  96. package/models/colDef/index.d.mts +1 -1
  97. package/models/colDef/index.d.ts +1 -1
  98. package/models/gridBaseSlots.d.mts +46 -0
  99. package/models/gridBaseSlots.d.ts +46 -0
  100. package/models/gridDataSource.d.mts +6 -0
  101. package/models/gridDataSource.d.ts +6 -0
  102. package/models/gridRows.d.mts +0 -1
  103. package/models/gridRows.d.ts +0 -1
  104. package/models/gridSlotsComponent.d.mts +5 -0
  105. package/models/gridSlotsComponent.d.ts +5 -0
  106. package/models/gridSlotsComponentsProps.d.mts +3 -1
  107. package/models/gridSlotsComponentsProps.d.ts +3 -1
  108. package/models/gridStateCommunity.d.mts +1 -1
  109. package/models/gridStateCommunity.d.ts +1 -1
  110. package/package.json +4 -4
@@ -250,7 +250,6 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
250
250
  export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
251
251
  /**
252
252
  * The type of the column.
253
- * @default 'actions'
254
253
  */
255
254
  type: 'actions';
256
255
  /**
@@ -282,7 +281,6 @@ export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F
282
281
  export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
283
282
  /**
284
283
  * The type of the column.
285
- * @default 'singleSelect'
286
284
  */
287
285
  type: 'singleSelect';
288
286
  /**
@@ -304,12 +302,46 @@ export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = a
304
302
  */
305
303
  getOptionValue: (value: ValueOptions) => any;
306
304
  }
305
+ /**
306
+ * Column Definition interface used for columns with the `multiSelect` type.
307
+ * @demos
308
+ * - [Special column properties](/x/react-data-grid/column-definition/#special-properties)
309
+ */
310
+ export interface GridMultiSelectColDef<R extends GridValidRowModel = any, V = (string | number)[], F = string> extends GridBaseColDef<R, V, F> {
311
+ /**
312
+ * The type of the column.
313
+ */
314
+ type: 'multiSelect';
315
+ /**
316
+ * To be used in combination with `type: 'multiSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
317
+ */
318
+ valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
319
+ /**
320
+ * Used to determine the label displayed for a given value option.
321
+ * @param {ValueOptions} value The current value option.
322
+ * @returns {string} The text to be displayed.
323
+ * @default {defaultGetOptionLabel}
324
+ */
325
+ getOptionLabel: (value: ValueOptions) => string;
326
+ /**
327
+ * Used to determine the value used for a value option.
328
+ * @param {ValueOptions} value The current value option.
329
+ * @returns {string | number} The value to be used.
330
+ * @default {defaultGetOptionValue}
331
+ */
332
+ getOptionValue: (value: ValueOptions) => string | number;
333
+ /**
334
+ * The separator used to join array values for display and export.
335
+ * @default ','
336
+ */
337
+ separator?: string;
338
+ }
307
339
  /**
308
340
  * Column Definition interface.
309
341
  * @demos
310
342
  * - [Column definition](/x/react-data-grid/column-definition/)
311
343
  */
312
- export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F>;
344
+ export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F> | GridMultiSelectColDef<R, V, F>;
313
345
  /**
314
346
  * Column Definition interface used for the list view column.
315
347
  * @demos
@@ -250,7 +250,6 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
250
250
  export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
251
251
  /**
252
252
  * The type of the column.
253
- * @default 'actions'
254
253
  */
255
254
  type: 'actions';
256
255
  /**
@@ -282,7 +281,6 @@ export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F
282
281
  export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
283
282
  /**
284
283
  * The type of the column.
285
- * @default 'singleSelect'
286
284
  */
287
285
  type: 'singleSelect';
288
286
  /**
@@ -304,12 +302,46 @@ export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = a
304
302
  */
305
303
  getOptionValue: (value: ValueOptions) => any;
306
304
  }
305
+ /**
306
+ * Column Definition interface used for columns with the `multiSelect` type.
307
+ * @demos
308
+ * - [Special column properties](/x/react-data-grid/column-definition/#special-properties)
309
+ */
310
+ export interface GridMultiSelectColDef<R extends GridValidRowModel = any, V = (string | number)[], F = string> extends GridBaseColDef<R, V, F> {
311
+ /**
312
+ * The type of the column.
313
+ */
314
+ type: 'multiSelect';
315
+ /**
316
+ * To be used in combination with `type: 'multiSelect'`. This is an array (or a function returning an array) of the possible cell values and labels.
317
+ */
318
+ valueOptions?: Array<ValueOptions> | ((params: GridValueOptionsParams<R>) => Array<ValueOptions>);
319
+ /**
320
+ * Used to determine the label displayed for a given value option.
321
+ * @param {ValueOptions} value The current value option.
322
+ * @returns {string} The text to be displayed.
323
+ * @default {defaultGetOptionLabel}
324
+ */
325
+ getOptionLabel: (value: ValueOptions) => string;
326
+ /**
327
+ * Used to determine the value used for a value option.
328
+ * @param {ValueOptions} value The current value option.
329
+ * @returns {string | number} The value to be used.
330
+ * @default {defaultGetOptionValue}
331
+ */
332
+ getOptionValue: (value: ValueOptions) => string | number;
333
+ /**
334
+ * The separator used to join array values for display and export.
335
+ * @default ','
336
+ */
337
+ separator?: string;
338
+ }
307
339
  /**
308
340
  * Column Definition interface.
309
341
  * @demos
310
342
  * - [Column definition](/x/react-data-grid/column-definition/)
311
343
  */
312
- export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F>;
344
+ export type GridColDef<R extends GridValidRowModel = any, V = any, F = V> = GridBaseColDef<R, V, F> | GridActionsColDef<R, V, F> | GridSingleSelectColDef<R, V, F> | GridMultiSelectColDef<R, V, F>;
313
345
  /**
314
346
  * Column Definition interface used for the list view column.
315
347
  * @demos
@@ -5,6 +5,7 @@ export interface GridColumnTypes {
5
5
  dateTime: 'dateTime';
6
6
  boolean: 'boolean';
7
7
  singleSelect: 'singleSelect';
8
+ multiSelect: 'multiSelect';
8
9
  actions: 'actions';
9
10
  custom: 'custom';
10
11
  longText: 'longText';
@@ -5,6 +5,7 @@ export interface GridColumnTypes {
5
5
  dateTime: 'dateTime';
6
6
  boolean: 'boolean';
7
7
  singleSelect: 'singleSelect';
8
+ multiSelect: 'multiSelect';
8
9
  actions: 'actions';
9
10
  custom: 'custom';
10
11
  longText: 'longText';
@@ -1,3 +1,3 @@
1
1
  import type { GridColTypeDef } from "./gridColDef.mjs";
2
2
  import type { GridColType } from "./gridColType.mjs";
3
- export type GridColumnTypesRecord = Record<GridColType, GridColTypeDef>;
3
+ export interface GridColumnTypesRecord extends Omit<Record<GridColType, GridColTypeDef>, 'multiSelect'> {}
@@ -1,3 +1,3 @@
1
1
  import type { GridColTypeDef } from "./gridColDef.js";
2
2
  import type { GridColType } from "./gridColType.js";
3
- export type GridColumnTypesRecord = Record<GridColType, GridColTypeDef>;
3
+ export interface GridColumnTypesRecord extends Omit<Record<GridColType, GridColTypeDef>, 'multiSelect'> {}
@@ -1,3 +1,3 @@
1
- export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.mjs";
1
+ export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridMultiSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.mjs";
2
2
  export * from "./gridColType.mjs";
3
3
  export * from "./gridColumnTypesRecord.mjs";
@@ -1,3 +1,3 @@
1
- export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.js";
1
+ export type { GridAlignment, ValueOptions, GridKeyValue, GridColDef, GridListViewColDef, GridColTypeDef, GridColumnsMeta, GridSingleSelectColDef, GridMultiSelectColDef, GridActionsColDef, GetApplyQuickFilterFn, GridValueGetter, GridValueFormatter, GridValueSetter, GridValueParser, GridColSpanFn } from "./gridColDef.js";
2
2
  export * from "./gridColType.js";
3
3
  export * from "./gridColumnTypesRecord.js";
@@ -54,10 +54,45 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
54
54
  * @param {string} value The new value of the input.
55
55
  */
56
56
  onInputChange?: (event: React.SyntheticEvent, value: string) => void;
57
+ /** Control the popup open state. */
58
+ open?: boolean;
59
+ /**
60
+ * Callback fired when the popup requests to be opened.
61
+ * @param {React.SyntheticEvent} event The event source of the callback.
62
+ */
63
+ onOpen?: (event: React.SyntheticEvent) => void;
64
+ /**
65
+ * Callback fired when the popup requests to be closed.
66
+ * @param {React.SyntheticEvent} event The event source of the callback.
67
+ * @param {string} reason The reason for closing.
68
+ */
69
+ onClose?: (event: React.SyntheticEvent, reason: string) => void;
70
+ /** If true, the popup won't close when a value is selected. */
71
+ disableCloseOnSelect?: boolean;
72
+ /** If true, the popup opens when the input is focused. */
73
+ openOnFocus?: boolean;
74
+ /**
75
+ * Render the option, use `getOptionLabel` by default.
76
+ * @param {React.HTMLAttributes<HTMLLIElement> & { key: any }} props The props to apply on the li element.
77
+ * @param {Value} option The option to render.
78
+ * @param {object} state The state of each option.
79
+ * @param {string} state.inputValue The input value.
80
+ * @param {number} state.index The index of the option in the list.
81
+ * @param {boolean} state.selected Whether the option is selected.
82
+ * @returns {React.ReactNode} react node to render
83
+ */
84
+ renderOption?: (props: React.HTMLAttributes<HTMLLIElement> & {
85
+ key: any;
86
+ }, option: Value, state: {
87
+ inputValue: string;
88
+ index: number;
89
+ selected: boolean;
90
+ }) => React.ReactNode;
57
91
  label?: React.ReactNode;
58
92
  placeholder?: string;
59
93
  slotProps?: {
60
94
  textField: TextFieldProps;
95
+ chip?: ChipProps | ((value: Value, index: number) => ChipProps);
61
96
  };
62
97
  };
63
98
  export type BadgeProps = CommonProps & {
@@ -182,6 +217,15 @@ export type PopperProps = CommonProps & {
182
217
  /** @default 'bottom' */
183
218
  placement?: Placement;
184
219
  };
220
+ export type ModalProps = CommonProps & {
221
+ open: boolean;
222
+ children: React.ReactElement<unknown>;
223
+ onClose?: (event: object, reason: 'backdropClick' | 'escapeKeyDown') => void;
224
+ keepMounted?: boolean;
225
+ disableAutoFocus?: boolean;
226
+ disableEnforceFocus?: boolean;
227
+ disableRestoreFocus?: boolean;
228
+ };
185
229
  export type CircularProgressProps = CommonProps & {
186
230
  /**
187
231
  * Pixels or CSS value.
@@ -225,9 +269,11 @@ export type SelectProps = CommonProps & {
225
269
  open?: boolean;
226
270
  error?: boolean;
227
271
  disabled?: boolean;
272
+ multiple?: boolean;
228
273
  onChange?: React.ChangeEventHandler;
229
274
  onOpen?: (event: React.SyntheticEvent) => void;
230
275
  onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
276
+ renderValue?: (value: any) => React.ReactNode;
231
277
  label?: React.ReactNode;
232
278
  labelId?: string;
233
279
  native?: boolean;
@@ -54,10 +54,45 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
54
54
  * @param {string} value The new value of the input.
55
55
  */
56
56
  onInputChange?: (event: React.SyntheticEvent, value: string) => void;
57
+ /** Control the popup open state. */
58
+ open?: boolean;
59
+ /**
60
+ * Callback fired when the popup requests to be opened.
61
+ * @param {React.SyntheticEvent} event The event source of the callback.
62
+ */
63
+ onOpen?: (event: React.SyntheticEvent) => void;
64
+ /**
65
+ * Callback fired when the popup requests to be closed.
66
+ * @param {React.SyntheticEvent} event The event source of the callback.
67
+ * @param {string} reason The reason for closing.
68
+ */
69
+ onClose?: (event: React.SyntheticEvent, reason: string) => void;
70
+ /** If true, the popup won't close when a value is selected. */
71
+ disableCloseOnSelect?: boolean;
72
+ /** If true, the popup opens when the input is focused. */
73
+ openOnFocus?: boolean;
74
+ /**
75
+ * Render the option, use `getOptionLabel` by default.
76
+ * @param {React.HTMLAttributes<HTMLLIElement> & { key: any }} props The props to apply on the li element.
77
+ * @param {Value} option The option to render.
78
+ * @param {object} state The state of each option.
79
+ * @param {string} state.inputValue The input value.
80
+ * @param {number} state.index The index of the option in the list.
81
+ * @param {boolean} state.selected Whether the option is selected.
82
+ * @returns {React.ReactNode} react node to render
83
+ */
84
+ renderOption?: (props: React.HTMLAttributes<HTMLLIElement> & {
85
+ key: any;
86
+ }, option: Value, state: {
87
+ inputValue: string;
88
+ index: number;
89
+ selected: boolean;
90
+ }) => React.ReactNode;
57
91
  label?: React.ReactNode;
58
92
  placeholder?: string;
59
93
  slotProps?: {
60
94
  textField: TextFieldProps;
95
+ chip?: ChipProps | ((value: Value, index: number) => ChipProps);
61
96
  };
62
97
  };
63
98
  export type BadgeProps = CommonProps & {
@@ -182,6 +217,15 @@ export type PopperProps = CommonProps & {
182
217
  /** @default 'bottom' */
183
218
  placement?: Placement;
184
219
  };
220
+ export type ModalProps = CommonProps & {
221
+ open: boolean;
222
+ children: React.ReactElement<unknown>;
223
+ onClose?: (event: object, reason: 'backdropClick' | 'escapeKeyDown') => void;
224
+ keepMounted?: boolean;
225
+ disableAutoFocus?: boolean;
226
+ disableEnforceFocus?: boolean;
227
+ disableRestoreFocus?: boolean;
228
+ };
185
229
  export type CircularProgressProps = CommonProps & {
186
230
  /**
187
231
  * Pixels or CSS value.
@@ -225,9 +269,11 @@ export type SelectProps = CommonProps & {
225
269
  open?: boolean;
226
270
  error?: boolean;
227
271
  disabled?: boolean;
272
+ multiple?: boolean;
228
273
  onChange?: React.ChangeEventHandler;
229
274
  onOpen?: (event: React.SyntheticEvent) => void;
230
275
  onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
276
+ renderValue?: (value: any) => React.ReactNode;
231
277
  label?: React.ReactNode;
232
278
  labelId?: string;
233
279
  native?: boolean;
@@ -27,6 +27,12 @@ export interface GridGetRowsOptions {
27
27
  * @default true
28
28
  */
29
29
  keepChildrenExpanded?: boolean;
30
+ /**
31
+ * If `false`, the loading indicator for children will not be shown during the fetch.
32
+ * Useful for background revalidation where loading indicators should be suppressed.
33
+ * @default true
34
+ */
35
+ showChildrenLoading?: boolean;
30
36
  }
31
37
  export interface GridUpdateRowParams {
32
38
  rowId: GridRowId;
@@ -27,6 +27,12 @@ export interface GridGetRowsOptions {
27
27
  * @default true
28
28
  */
29
29
  keepChildrenExpanded?: boolean;
30
+ /**
31
+ * If `false`, the loading indicator for children will not be shown during the fetch.
32
+ * Useful for background revalidation where loading indicators should be suppressed.
33
+ * @default true
34
+ */
35
+ showChildrenLoading?: boolean;
30
36
  }
31
37
  export interface GridUpdateRowParams {
32
38
  rowId: GridRowId;
@@ -129,7 +129,6 @@ export interface GridSkeletonRowNode extends GridTreeBasicNode {
129
129
  type: 'skeletonRow';
130
130
  /**
131
131
  * The id of the group containing this node.
132
- * Is always equal to `GRID_ROOT_GROUP_ID`.
133
132
  */
134
133
  parent: GridRowId;
135
134
  }
@@ -129,7 +129,6 @@ export interface GridSkeletonRowNode extends GridTreeBasicNode {
129
129
  type: 'skeletonRow';
130
130
  /**
131
131
  * The id of the group containing this node.
132
- * Is always equal to `GRID_ROOT_GROUP_ID`.
133
132
  */
134
133
  parent: GridRowId;
135
134
  }
@@ -48,6 +48,11 @@ export interface GridBaseSlots {
48
48
  * @default MenuItem
49
49
  */
50
50
  baseMenuItem: React.JSXElementConstructor<GridSlotProps['baseMenuItem']>;
51
+ /**
52
+ * The custom Modal component used in the grid.
53
+ * @default Modal
54
+ */
55
+ baseModal: React.JSXElementConstructor<GridSlotProps['baseModal']>;
51
56
  /**
52
57
  * The custom TextField component used in the grid.
53
58
  * @default TextField
@@ -48,6 +48,11 @@ export interface GridBaseSlots {
48
48
  * @default MenuItem
49
49
  */
50
50
  baseMenuItem: React.JSXElementConstructor<GridSlotProps['baseMenuItem']>;
51
+ /**
52
+ * The custom Modal component used in the grid.
53
+ * @default Modal
54
+ */
55
+ baseModal: React.JSXElementConstructor<GridSlotProps['baseModal']>;
51
56
  /**
52
57
  * The custom TextField component used in the grid.
53
58
  * @default TextField
@@ -19,7 +19,7 @@ import type { GridRowCountProps } from "../components/GridRowCount.mjs";
19
19
  import type { GridColumnHeaderSortIconProps } from "../components/columnHeaders/GridColumnHeaderSortIcon.mjs";
20
20
  import type { GridBottomContainerProps } from "../components/virtualization/GridBottomContainer.mjs";
21
21
  import type { GridRowId } from "./gridRows.mjs";
22
- import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.mjs";
22
+ import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, ModalProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.mjs";
23
23
  type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
24
24
  type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
25
25
  export interface BaseAutocompletePropsOverrides {}
@@ -31,6 +31,7 @@ export interface BaseDividerPropsOverrides {}
31
31
  export interface BaseLinearProgressPropsOverrides {}
32
32
  export interface BaseMenuListPropsOverrides {}
33
33
  export interface BaseMenuItemPropsOverrides {}
34
+ export interface BaseModalPropsOverrides {}
34
35
  export interface BaseTabsPropsOverrides {}
35
36
  export interface BaseTextFieldPropsOverrides {}
36
37
  export interface BaseSelectPropsOverrides {}
@@ -79,6 +80,7 @@ interface BaseSlotProps {
79
80
  baseLinearProgress: LinearProgressProps & BaseLinearProgressPropsOverrides;
80
81
  baseMenuList: MenuListProps & BaseMenuListPropsOverrides;
81
82
  baseMenuItem: MenuItemProps & BaseMenuItemPropsOverrides;
83
+ baseModal: ModalProps & BaseModalPropsOverrides;
82
84
  baseTabs: TabsProps & BaseTabsPropsOverrides;
83
85
  baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
84
86
  baseSwitch: SwitchProps & BaseSwitchPropsOverrides;
@@ -19,7 +19,7 @@ import type { GridRowCountProps } from "../components/GridRowCount.js";
19
19
  import type { GridColumnHeaderSortIconProps } from "../components/columnHeaders/GridColumnHeaderSortIcon.js";
20
20
  import type { GridBottomContainerProps } from "../components/virtualization/GridBottomContainer.js";
21
21
  import type { GridRowId } from "./gridRows.js";
22
- import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.js";
22
+ import type { AutocompleteProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, CircularProgressProps, DividerProps, IconButtonProps, InputProps, LinearProgressProps, MenuListProps, MenuItemProps, ModalProps, PaginationProps, PopperProps, SelectProps, SelectOptionProps, SkeletonProps, SwitchProps, TextareaProps, TooltipProps, TextFieldProps, IconProps, TabsProps, ToggleButtonProps } from "./gridBaseSlots.js";
23
23
  type RootProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
24
24
  type MainProps = React.HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string>;
25
25
  export interface BaseAutocompletePropsOverrides {}
@@ -31,6 +31,7 @@ export interface BaseDividerPropsOverrides {}
31
31
  export interface BaseLinearProgressPropsOverrides {}
32
32
  export interface BaseMenuListPropsOverrides {}
33
33
  export interface BaseMenuItemPropsOverrides {}
34
+ export interface BaseModalPropsOverrides {}
34
35
  export interface BaseTabsPropsOverrides {}
35
36
  export interface BaseTextFieldPropsOverrides {}
36
37
  export interface BaseSelectPropsOverrides {}
@@ -79,6 +80,7 @@ interface BaseSlotProps {
79
80
  baseLinearProgress: LinearProgressProps & BaseLinearProgressPropsOverrides;
80
81
  baseMenuList: MenuListProps & BaseMenuListPropsOverrides;
81
82
  baseMenuItem: MenuItemProps & BaseMenuItemPropsOverrides;
83
+ baseModal: ModalProps & BaseModalPropsOverrides;
82
84
  baseTabs: TabsProps & BaseTabsPropsOverrides;
83
85
  baseTextField: TextFieldProps & BaseTextFieldPropsOverrides;
84
86
  baseSwitch: SwitchProps & BaseSwitchPropsOverrides;
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
13
13
  * Some props are passed on the state to enable grid selectors to select
14
14
  * and react to them.
15
15
  */
16
- export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource'>;
16
+ export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource' | 'signature'>;
17
17
  /**
18
18
  * The state of Data Grid.
19
19
  */
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
13
13
  * Some props are passed on the state to enable grid selectors to select
14
14
  * and react to them.
15
15
  */
16
- export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource'>;
16
+ export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource' | 'signature'>;
17
17
  /**
18
18
  * The state of Data Grid.
19
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Community plan edition of the MUI X Data Grid components.",
6
6
  "license": "MIT",
@@ -37,13 +37,13 @@
37
37
  "directory": "packages/x-data-grid"
38
38
  },
39
39
  "dependencies": {
40
- "@babel/runtime": "^7.29.2",
40
+ "@babel/runtime": "^7.29.7",
41
41
  "@mui/utils": "9.0.1",
42
42
  "clsx": "^2.1.1",
43
43
  "prop-types": "^15.8.1",
44
44
  "use-sync-external-store": "^1.6.0",
45
- "@mui/x-virtualizer": "9.0.0-alpha.7",
46
- "@mui/x-internals": "^9.1.0"
45
+ "@mui/x-internals": "^9.1.0",
46
+ "@mui/x-virtualizer": "9.0.0-alpha.8"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",