@mui/x-data-grid 8.0.0-alpha.6 → 8.0.0-alpha.7

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 (95) hide show
  1. package/CHANGELOG.md +127 -1
  2. package/DataGrid/useDataGridComponent.d.ts +1 -1
  3. package/components/cell/GridActionsCellItem.d.ts +16 -9
  4. package/components/cell/GridActionsCellItem.js +2 -0
  5. package/components/cell/GridEditDateCell.js +1 -1
  6. package/components/cell/GridEditInputCell.js +1 -1
  7. package/components/cell/GridEditSingleSelectCell.js +2 -2
  8. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  9. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  10. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  11. package/components/columnSelection/GridHeaderCheckbox.js +6 -2
  12. package/components/columnsManagement/GridColumnsManagement.js +2 -2
  13. package/components/panel/GridPanel.d.ts +1 -1
  14. package/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  15. package/components/toolbar/GridToolbarQuickFilter.js +2 -2
  16. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  17. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +1 -1
  18. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +1 -1
  19. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  20. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
  21. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  22. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +1 -1
  23. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +1 -1
  24. package/hooks/core/useGridApiInitialization.d.ts +1 -1
  25. package/hooks/core/useGridApiInitialization.js +2 -2
  26. package/hooks/core/useGridInitialization.d.ts +1 -1
  27. package/hooks/core/useGridIsRtl.d.ts +1 -1
  28. package/hooks/core/useGridLocaleText.d.ts +1 -1
  29. package/hooks/core/useGridLoggerFactory.d.ts +1 -1
  30. package/hooks/core/useGridRefs.d.ts +1 -1
  31. package/hooks/core/useGridStateInitialization.d.ts +1 -1
  32. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  33. package/hooks/features/columnResize/useGridColumnResize.js +4 -4
  34. package/hooks/features/editing/useGridRowEditing.js +1 -1
  35. package/hooks/features/export/useGridPrintExport.js +1 -1
  36. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
  37. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  38. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +1 -1
  39. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +1 -1
  40. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +3 -3
  41. package/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  42. package/hooks/utils/useGridApiEventHandler.js +1 -1
  43. package/hooks/utils/useGridApiMethod.d.ts +1 -1
  44. package/hooks/utils/useGridApiRef.d.ts +1 -1
  45. package/hooks/utils/useGridInitializeState.d.ts +2 -2
  46. package/hooks/utils/useGridLogger.d.ts +1 -1
  47. package/hooks/utils/useGridVisibleRows.d.ts +2 -2
  48. package/index.js +1 -1
  49. package/internals/index.d.ts +1 -1
  50. package/models/api/gridCoreApi.d.ts +7 -7
  51. package/models/api/gridDensityApi.d.ts +1 -1
  52. package/models/gridBaseSlots.d.ts +32 -2
  53. package/models/gridSlotsComponentsProps.d.ts +12 -8
  54. package/models/props/DataGridProps.d.ts +1 -1
  55. package/modern/components/cell/GridActionsCellItem.js +2 -0
  56. package/modern/components/cell/GridEditDateCell.js +1 -1
  57. package/modern/components/cell/GridEditInputCell.js +1 -1
  58. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  59. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  60. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  61. package/modern/components/columnSelection/GridHeaderCheckbox.js +6 -2
  62. package/modern/components/columnsManagement/GridColumnsManagement.js +2 -2
  63. package/modern/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  64. package/modern/components/toolbar/GridToolbarQuickFilter.js +2 -2
  65. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  66. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  67. package/modern/hooks/core/useGridApiInitialization.js +2 -2
  68. package/modern/hooks/features/columnResize/useGridColumnResize.js +4 -4
  69. package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
  70. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  71. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  72. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  73. package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
  74. package/modern/index.js +1 -1
  75. package/node/components/cell/GridActionsCellItem.js +1 -1
  76. package/node/components/cell/GridEditDateCell.js +1 -1
  77. package/node/components/cell/GridEditInputCell.js +1 -1
  78. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  79. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  80. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  81. package/node/components/columnSelection/GridHeaderCheckbox.js +6 -2
  82. package/node/components/columnsManagement/GridColumnsManagement.js +2 -2
  83. package/node/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  84. package/node/components/toolbar/GridToolbarQuickFilter.js +2 -2
  85. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  86. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  87. package/node/hooks/core/useGridApiInitialization.js +2 -2
  88. package/node/hooks/features/columnResize/useGridColumnResize.js +4 -4
  89. package/node/hooks/features/editing/useGridRowEditing.js +1 -1
  90. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  91. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  92. package/node/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  93. package/node/hooks/utils/useGridApiEventHandler.js +1 -1
  94. package/node/index.js +1 -1
  95. package/package.json +2 -2
@@ -86,6 +86,7 @@ export const useGridVirtualScroller = () => {
86
86
  const contentHeight = dimensions.contentSize.height;
87
87
  const columnsTotalWidth = dimensions.columnsTotalWidth;
88
88
  const hasColSpan = useGridSelector(apiRef, gridHasColSpanSelector);
89
+ const previousSize = React.useRef(null);
89
90
  const mainRefCallback = React.useCallback(node => {
90
91
  mainRef.current = node;
91
92
  if (!node) {
@@ -93,7 +94,10 @@ export const useGridVirtualScroller = () => {
93
94
  }
94
95
  const initialRect = node.getBoundingClientRect();
95
96
  let lastSize = roundDimensions(initialRect);
96
- apiRef.current.publishEvent('resize', lastSize);
97
+ if (!previousSize.current || lastSize.width !== previousSize.current.width && lastSize.height !== previousSize.current.height) {
98
+ previousSize.current = lastSize;
99
+ apiRef.current.publishEvent('resize', lastSize);
100
+ }
97
101
  if (typeof ResizeObserver === 'undefined') {
98
102
  return undefined;
99
103
  }
@@ -24,7 +24,7 @@ export function createUseGridApiEventHandler(registryContainer) {
24
24
  }
25
25
  const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());
26
26
  const subscription = React.useRef(null);
27
- const handlerRef = React.useRef();
27
+ const handlerRef = React.useRef(null);
28
28
  handlerRef.current = handler;
29
29
  const cleanupTokenRef = React.useRef(null);
30
30
  if (!subscription.current && handlerRef.current) {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.0.0-alpha.6
2
+ * @mui/x-data-grid v8.0.0-alpha.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -14,7 +14,7 @@ var _forwardRef = require("@mui/x-internals/forwardRef");
14
14
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  const _excluded = ["label", "icon", "showInMenu", "onClick"],
17
- _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
17
+ _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"]; // FIXME(v8:romgrk): Make parametric
18
18
  const GridActionsCellItem = exports.GridActionsCellItem = (0, _forwardRef.forwardRef)((props, ref) => {
19
19
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
20
20
  if (!props.showInMenu) {
@@ -44,7 +44,7 @@ function GridEditDateCell(props) {
44
44
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
45
45
  const isDateTime = colDef.type === 'dateTime';
46
46
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
47
- const inputRef = React.useRef();
47
+ const inputRef = React.useRef(null);
48
48
  const valueTransformed = React.useMemo(() => {
49
49
  let parsedDate;
50
50
  if (valueProp == null) {
@@ -55,7 +55,7 @@ const GridEditInputCell = exports.GridEditInputCell = (0, _forwardRef.forwardRef
55
55
  } = props,
56
56
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
57
57
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
58
- const inputRef = React.useRef();
58
+ const inputRef = React.useRef(null);
59
59
  const [valueState, setValueState] = React.useState(value);
60
60
  const classes = useUtilityClasses(rootProps);
61
61
  const handleChange = React.useCallback(async event => {
@@ -39,8 +39,8 @@ function GridEditSingleSelectCell(props) {
39
39
  } = props,
40
40
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
41
41
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
42
- const ref = React.useRef();
43
- const inputRef = React.useRef();
42
+ const ref = React.useRef(null);
43
+ const inputRef = React.useRef(null);
44
44
  const [open, setOpen] = React.useState(initialOpen);
45
45
  const baseSelectProps = rootProps.slotProps?.baseSelect || {};
46
46
  const isSelectNative = baseSelectProps.native ?? false;
@@ -65,7 +65,6 @@ function GridColumnHeaderFilterIconButton(props) {
65
65
  const iconButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
66
66
  id: labelId,
67
67
  onClick: toggleFilter,
68
- color: "default",
69
68
  "aria-label": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),
70
69
  size: "small",
71
70
  tabIndex: -1,
@@ -95,7 +95,8 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = (0, _for
95
95
  onChange: handleChange,
96
96
  className: classes.root,
97
97
  inputProps: {
98
- 'aria-label': label
98
+ 'aria-label': label,
99
+ name: 'select_row'
99
100
  },
100
101
  onKeyDown: handleKeyDown,
101
102
  indeterminate: isIndeterminate,
@@ -50,13 +50,16 @@ const GridHeaderCheckbox = exports.GridHeaderCheckbox = (0, _forwardRef.forwardR
50
50
  return selection;
51
51
  }
52
52
  return selection.filter(id => {
53
+ if (rootProps.keepNonExistentRowsSelected) {
54
+ return true;
55
+ }
53
56
  // The row might have been deleted
54
57
  if (!apiRef.current.getRow(id)) {
55
58
  return false;
56
59
  }
57
60
  return rootProps.isRowSelectable(apiRef.current.getRowParams(id));
58
61
  });
59
- }, [apiRef, rootProps.isRowSelectable, selection]);
62
+ }, [apiRef, rootProps.isRowSelectable, selection, rootProps.keepNonExistentRowsSelected]);
60
63
 
61
64
  // All the rows that could be selected / unselected by toggling this checkbox
62
65
  const selectionCandidates = React.useMemo(() => {
@@ -111,7 +114,8 @@ const GridHeaderCheckbox = exports.GridHeaderCheckbox = (0, _forwardRef.forwardR
111
114
  onChange: handleChange,
112
115
  className: classes.root,
113
116
  inputProps: {
114
- 'aria-label': label
117
+ 'aria-label': label,
118
+ name: 'select_all_rows'
115
119
  },
116
120
  tabIndex: tabIndex,
117
121
  onKeyDown: handleKeyDown,
@@ -149,11 +149,11 @@ function GridColumnsManagement(props) {
149
149
  endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
150
150
  "aria-label": apiRef.current.getLocaleText('columnsManagementDeleteIconLabel'),
151
151
  size: "small",
152
- sx: [searchValue ? {
152
+ style: searchValue ? {
153
153
  visibility: 'visible'
154
154
  } : {
155
155
  visibility: 'hidden'
156
- }],
156
+ },
157
157
  tabIndex: -1,
158
158
  onClick: handleSearchReset
159
159
  }, rootProps.slotProps?.baseIconButton, {
@@ -30,17 +30,17 @@ function GridFilterInputValue(props) {
30
30
  } = props,
31
31
  others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
32
32
  const filterTimeout = (0, _useTimeout.useTimeout)();
33
- const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value, type));
33
+ const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
34
34
  const [applying, setIsApplying] = React.useState(false);
35
35
  const id = (0, _utils.unstable_useId)();
36
36
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
37
37
  const onFilterChange = React.useCallback(event => {
38
- const value = sanitizeFilterItemValue(event.target.value, type);
38
+ const value = sanitizeFilterItemValue(event.target.value);
39
39
  setFilterValueState(value);
40
40
  setIsApplying(true);
41
41
  filterTimeout.start(rootProps.filterDebounceMs, () => {
42
42
  const newItem = (0, _extends2.default)({}, item, {
43
- value,
43
+ value: type === 'number' && !Number.isNaN(Number(value)) ? Number(value) : value,
44
44
  fromInput: id
45
45
  });
46
46
  applyValue(newItem);
@@ -50,14 +50,14 @@ function GridFilterInputValue(props) {
50
50
  React.useEffect(() => {
51
51
  const itemPlusTag = item;
52
52
  if (itemPlusTag.fromInput !== id || item.value == null) {
53
- setFilterValueState(sanitizeFilterItemValue(item.value, type));
53
+ setFilterValueState(sanitizeFilterItemValue(item.value));
54
54
  }
55
- }, [id, item, type]);
55
+ }, [id, item]);
56
56
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTextField, (0, _extends2.default)({
57
57
  id: id,
58
58
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
59
59
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
60
- value: filterValueState === undefined ? '' : String(filterValueState),
60
+ value: filterValueState ?? '',
61
61
  onChange: onFilterChange,
62
62
  variant: variant,
63
63
  type: type || 'text',
@@ -79,13 +79,10 @@ function GridFilterInputValue(props) {
79
79
  inputRef: focusElementRef
80
80
  }, others, rootProps.slotProps?.baseTextField));
81
81
  }
82
- function sanitizeFilterItemValue(value, type) {
82
+ function sanitizeFilterItemValue(value) {
83
83
  if (value == null || value === '') {
84
84
  return undefined;
85
85
  }
86
- if (type === 'number') {
87
- return Number(value);
88
- }
89
86
  return String(value);
90
87
  }
91
88
  process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
@@ -117,11 +117,11 @@ function GridToolbarQuickFilter(props) {
117
117
  "aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
118
118
  size: "small",
119
119
  edge: "end",
120
- sx: [searchValue ? {
120
+ style: searchValue ? {
121
121
  visibility: 'visible'
122
122
  } : {
123
123
  visibility: 'hidden'
124
- }],
124
+ },
125
125
  onClick: handleSearchReset
126
126
  }, rootProps.slotProps?.baseIconButton, {
127
127
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.quickFilterClearIcon, {
@@ -8,7 +8,7 @@ exports.useGridRegisterPipeApplier = void 0;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _useFirstRender = require("../../utils/useFirstRender");
10
10
  const useGridRegisterPipeApplier = (apiRef, group, callback) => {
11
- const cleanup = React.useRef();
11
+ const cleanup = React.useRef(null);
12
12
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
13
13
  const registerPreProcessor = React.useCallback(() => {
14
14
  cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
@@ -8,7 +8,7 @@ exports.useGridRegisterPipeProcessor = void 0;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _useFirstRender = require("../../utils/useFirstRender");
10
10
  const useGridRegisterPipeProcessor = (apiRef, group, callback) => {
11
- const cleanup = React.useRef();
11
+ const cleanup = React.useRef(null);
12
12
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
13
13
  const registerPreProcessor = React.useCallback(() => {
14
14
  cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
@@ -76,8 +76,8 @@ function createPublicAPI(privateApiRef) {
76
76
  return publicApi;
77
77
  }
78
78
  function useGridApiInitialization(inputApiRef, props) {
79
- const publicApiRef = React.useRef();
80
- const privateApiRef = React.useRef();
79
+ const publicApiRef = React.useRef(null);
80
+ const privateApiRef = React.useRef(null);
81
81
  if (!privateApiRef.current) {
82
82
  privateApiRef.current = createPrivateAPI(publicApiRef);
83
83
  }
@@ -78,7 +78,7 @@ function preventClick(event) {
78
78
  * is disabled.
79
79
  */
80
80
  function useColumnVirtualizationDisabled(apiRef) {
81
- const promise = React.useRef();
81
+ const promise = React.useRef(undefined);
82
82
  const selector = () => (0, _virtualization.gridVirtualizationColumnEnabledSelector)(apiRef);
83
83
  const value = (0, _utils2.useGridSelector)(apiRef, selector);
84
84
  React.useEffect(() => {
@@ -193,10 +193,10 @@ const useGridColumnResize = (apiRef, props) => {
193
193
  // To improve accessibility, the separator has padding on both sides.
194
194
  // Clicking inside the padding area should be treated as a click in the separator.
195
195
  // This ref stores the offset between the click and the separator.
196
- const initialOffsetToSeparator = React.useRef();
197
- const resizeDirection = React.useRef();
196
+ const initialOffsetToSeparator = React.useRef(null);
197
+ const resizeDirection = React.useRef(null);
198
198
  const stopResizeEventTimeout = (0, _useTimeout.useTimeout)();
199
- const touchId = React.useRef();
199
+ const touchId = React.useRef(undefined);
200
200
  const updateWidth = newWidth => {
201
201
  logger.debug(`Updating width to ${newWidth} for col ${refs.colDef.field}`);
202
202
  const prevWidth = refs.columnHeaderElement.offsetWidth;
@@ -29,7 +29,7 @@ const useGridRowEditing = (apiRef, props) => {
29
29
  const [rowModesModel, setRowModesModel] = React.useState({});
30
30
  const rowModesModelRef = React.useRef(rowModesModel);
31
31
  const prevRowModesModel = React.useRef({});
32
- const focusTimeout = React.useRef();
32
+ const focusTimeout = React.useRef(undefined);
33
33
  const nextFocusedCell = React.useRef(null);
34
34
  const {
35
35
  processRowUpdate,
@@ -52,7 +52,7 @@ const useGridPrintExport = (apiRef, props) => {
52
52
  const previousGridState = React.useRef(null);
53
53
  const previousColumnVisibility = React.useRef({});
54
54
  const previousRows = React.useRef([]);
55
- const previousVirtualizationState = React.useRef();
55
+ const previousVirtualizationState = React.useRef(null);
56
56
  React.useEffect(() => {
57
57
  doc.current = (0, _utils.unstable_ownerDocument)(apiRef.current.rootElementRef.current);
58
58
  }, [apiRef, hasRootReference]);
@@ -24,8 +24,8 @@ const preferencePanelStateInitializer = (state, props) => (0, _extends2.default)
24
24
  exports.preferencePanelStateInitializer = preferencePanelStateInitializer;
25
25
  const useGridPreferencesPanel = (apiRef, props) => {
26
26
  const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useGridPreferencesPanel');
27
- const hideTimeout = React.useRef();
28
- const immediateTimeout = React.useRef();
27
+ const hideTimeout = React.useRef(undefined);
28
+ const immediateTimeout = React.useRef(undefined);
29
29
 
30
30
  /**
31
31
  * API METHODS
@@ -97,6 +97,7 @@ const useGridVirtualScroller = () => {
97
97
  const contentHeight = dimensions.contentSize.height;
98
98
  const columnsTotalWidth = dimensions.columnsTotalWidth;
99
99
  const hasColSpan = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridHasColSpanSelector);
100
+ const previousSize = React.useRef(null);
100
101
  const mainRefCallback = React.useCallback(node => {
101
102
  mainRef.current = node;
102
103
  if (!node) {
@@ -104,7 +105,10 @@ const useGridVirtualScroller = () => {
104
105
  }
105
106
  const initialRect = node.getBoundingClientRect();
106
107
  let lastSize = roundDimensions(initialRect);
107
- apiRef.current.publishEvent('resize', lastSize);
108
+ if (!previousSize.current || lastSize.width !== previousSize.current.width && lastSize.height !== previousSize.current.height) {
109
+ previousSize.current = lastSize;
110
+ apiRef.current.publishEvent('resize', lastSize);
111
+ }
108
112
  if (typeof ResizeObserver === 'undefined') {
109
113
  return undefined;
110
114
  }
@@ -34,7 +34,7 @@ function createUseGridApiEventHandler(registryContainer) {
34
34
  }
35
35
  const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());
36
36
  const subscription = React.useRef(null);
37
- const handlerRef = React.useRef();
37
+ const handlerRef = React.useRef(null);
38
38
  handlerRef.current = handler;
39
39
  const cleanupTokenRef = React.useRef(null);
40
40
  if (!subscription.current && handlerRef.current) {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.0.0-alpha.6
2
+ * @mui/x-data-grid v8.0.0-alpha.7
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "8.0.0-alpha.6",
3
+ "version": "8.0.0-alpha.7",
4
4
  "description": "The Community plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -42,7 +42,7 @@
42
42
  "clsx": "^2.1.1",
43
43
  "prop-types": "^15.8.1",
44
44
  "reselect": "^5.1.1",
45
- "@mui/x-internals": "8.0.0-alpha.6"
45
+ "@mui/x-internals": "8.0.0-alpha.7"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@emotion/react": "^11.9.0",