@mui/x-data-grid 7.23.2 → 7.23.4

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 (202) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/DataGrid/DataGrid.js +7 -4
  3. package/README.md +1 -1
  4. package/components/GridColumnHeaders.d.ts +1 -1
  5. package/components/GridColumnHeaders.js +4 -4
  6. package/components/GridFooter.d.ts +2 -1
  7. package/components/GridFooter.js +4 -4
  8. package/components/GridLoadingOverlay.d.ts +1 -1
  9. package/components/GridLoadingOverlay.js +3 -2
  10. package/components/GridNoResultsOverlay.d.ts +2 -1
  11. package/components/GridNoResultsOverlay.js +4 -4
  12. package/components/GridNoRowsOverlay.d.ts +2 -1
  13. package/components/GridNoRowsOverlay.js +4 -4
  14. package/components/GridPagination.d.ts +1 -1
  15. package/components/GridPagination.js +5 -3
  16. package/components/GridRow.d.ts +1 -1
  17. package/components/GridRow.js +15 -3
  18. package/components/GridRowCount.d.ts +1 -1
  19. package/components/GridRowCount.js +3 -2
  20. package/components/GridSelectedRowCount.d.ts +4 -1
  21. package/components/GridSelectedRowCount.js +3 -2
  22. package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
  23. package/components/GridSkeletonLoadingOverlay.js +4 -3
  24. package/components/cell/GridActionsCell.js +8 -1
  25. package/components/cell/GridActionsCellItem.d.ts +1 -1
  26. package/components/cell/GridActionsCellItem.js +3 -2
  27. package/components/cell/GridCell.d.ts +1 -1
  28. package/components/cell/GridCell.js +3 -2
  29. package/components/cell/GridEditInputCell.d.ts +1 -1
  30. package/components/cell/GridEditInputCell.js +72 -3
  31. package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
  32. package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  33. package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  34. package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
  35. package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  36. package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
  37. package/components/columnHeaders/GridIconButtonContainer.js +5 -3
  38. package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
  39. package/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
  40. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  41. package/components/columnSelection/GridHeaderCheckbox.js +6 -4
  42. package/components/containers/GridFooterContainer.d.ts +1 -1
  43. package/components/containers/GridFooterContainer.js +5 -3
  44. package/components/containers/GridOverlay.d.ts +1 -1
  45. package/components/containers/GridOverlay.js +5 -3
  46. package/components/containers/GridRoot.d.ts +1 -1
  47. package/components/containers/GridRoot.js +5 -3
  48. package/components/containers/GridToolbarContainer.d.ts +1 -1
  49. package/components/containers/GridToolbarContainer.js +3 -2
  50. package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
  51. package/components/menu/columnMenu/GridColumnMenu.js +5 -5
  52. package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
  53. package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  54. package/components/panel/GridPanel.d.ts +1 -1
  55. package/components/panel/GridPanel.js +3 -2
  56. package/components/panel/GridPanelWrapper.d.ts +1 -1
  57. package/components/panel/GridPanelWrapper.js +5 -3
  58. package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
  59. package/components/panel/filterPanel/GridFilterForm.js +3 -2
  60. package/components/panel/filterPanel/GridFilterInputValue.js +17 -10
  61. package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
  62. package/components/panel/filterPanel/GridFilterPanel.js +4 -4
  63. package/components/toolbar/GridToolbar.d.ts +1 -1
  64. package/components/toolbar/GridToolbar.js +4 -4
  65. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  66. package/components/toolbar/GridToolbarColumnsButton.js +3 -2
  67. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  68. package/components/toolbar/GridToolbarDensitySelector.js +3 -2
  69. package/components/toolbar/GridToolbarExport.d.ts +1 -1
  70. package/components/toolbar/GridToolbarExport.js +2 -1
  71. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  72. package/components/toolbar/GridToolbarExportContainer.js +3 -2
  73. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  74. package/components/toolbar/GridToolbarFilterButton.js +3 -2
  75. package/components/virtualization/GridMainContainer.d.ts +3 -1
  76. package/components/virtualization/GridMainContainer.js +4 -3
  77. package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
  78. package/components/virtualization/GridVirtualScrollbar.js +2 -1
  79. package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
  80. package/components/virtualization/GridVirtualScrollerContent.js +5 -5
  81. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
  82. package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  83. package/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  84. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
  85. package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  86. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  87. package/hooks/features/columnResize/useGridColumnResize.js +9 -4
  88. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
  89. package/hooks/features/columns/gridColumnsUtils.js +2 -1
  90. package/hooks/features/rows/useGridRowSpanning.js +13 -5
  91. package/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  92. package/index.js +1 -1
  93. package/internals/utils/useProps.js +3 -0
  94. package/locales/koKR.js +36 -39
  95. package/locales/nlNL.js +5 -6
  96. package/models/gridSlotsComponentsProps.d.ts +10 -0
  97. package/models/props/DataGridProps.d.ts +1 -0
  98. package/modern/DataGrid/DataGrid.js +7 -4
  99. package/modern/components/GridColumnHeaders.js +4 -4
  100. package/modern/components/GridFooter.js +4 -4
  101. package/modern/components/GridLoadingOverlay.js +3 -2
  102. package/modern/components/GridNoResultsOverlay.js +4 -4
  103. package/modern/components/GridNoRowsOverlay.js +4 -4
  104. package/modern/components/GridPagination.js +5 -3
  105. package/modern/components/GridRow.js +15 -3
  106. package/modern/components/GridRowCount.js +3 -2
  107. package/modern/components/GridSelectedRowCount.js +3 -2
  108. package/modern/components/GridSkeletonLoadingOverlay.js +4 -3
  109. package/modern/components/cell/GridActionsCell.js +8 -1
  110. package/modern/components/cell/GridActionsCellItem.js +3 -2
  111. package/modern/components/cell/GridCell.js +3 -2
  112. package/modern/components/cell/GridEditInputCell.js +72 -3
  113. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  114. package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  115. package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  116. package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
  117. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
  118. package/modern/components/columnSelection/GridHeaderCheckbox.js +6 -4
  119. package/modern/components/containers/GridFooterContainer.js +5 -3
  120. package/modern/components/containers/GridOverlay.js +5 -3
  121. package/modern/components/containers/GridRoot.js +5 -3
  122. package/modern/components/containers/GridToolbarContainer.js +3 -2
  123. package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
  124. package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  125. package/modern/components/panel/GridPanel.js +3 -2
  126. package/modern/components/panel/GridPanelWrapper.js +5 -3
  127. package/modern/components/panel/filterPanel/GridFilterForm.js +3 -2
  128. package/modern/components/panel/filterPanel/GridFilterInputValue.js +17 -10
  129. package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
  130. package/modern/components/toolbar/GridToolbar.js +4 -4
  131. package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -2
  132. package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -2
  133. package/modern/components/toolbar/GridToolbarExport.js +2 -1
  134. package/modern/components/toolbar/GridToolbarExportContainer.js +3 -2
  135. package/modern/components/toolbar/GridToolbarFilterButton.js +3 -2
  136. package/modern/components/virtualization/GridMainContainer.js +4 -3
  137. package/modern/components/virtualization/GridVirtualScrollbar.js +2 -1
  138. package/modern/components/virtualization/GridVirtualScrollerContent.js +5 -5
  139. package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  140. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  141. package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  142. package/modern/hooks/features/columnResize/useGridColumnResize.js +9 -4
  143. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
  144. package/modern/hooks/features/rows/useGridRowSpanning.js +13 -5
  145. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  146. package/modern/index.js +1 -1
  147. package/modern/internals/utils/useProps.js +3 -0
  148. package/modern/locales/koKR.js +36 -39
  149. package/modern/locales/nlNL.js +5 -6
  150. package/node/DataGrid/DataGrid.js +7 -4
  151. package/node/components/GridColumnHeaders.js +4 -4
  152. package/node/components/GridFooter.js +4 -4
  153. package/node/components/GridLoadingOverlay.js +3 -2
  154. package/node/components/GridNoResultsOverlay.js +4 -4
  155. package/node/components/GridNoRowsOverlay.js +4 -4
  156. package/node/components/GridPagination.js +5 -3
  157. package/node/components/GridRow.js +15 -3
  158. package/node/components/GridRowCount.js +3 -2
  159. package/node/components/GridSelectedRowCount.js +3 -2
  160. package/node/components/GridSkeletonLoadingOverlay.js +4 -3
  161. package/node/components/cell/GridActionsCell.js +8 -1
  162. package/node/components/cell/GridActionsCellItem.js +3 -2
  163. package/node/components/cell/GridCell.js +3 -2
  164. package/node/components/cell/GridEditInputCell.js +72 -3
  165. package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
  166. package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
  167. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
  168. package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
  169. package/node/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
  170. package/node/components/columnSelection/GridHeaderCheckbox.js +6 -4
  171. package/node/components/containers/GridFooterContainer.js +5 -3
  172. package/node/components/containers/GridOverlay.js +5 -3
  173. package/node/components/containers/GridRoot.js +5 -3
  174. package/node/components/containers/GridToolbarContainer.js +3 -2
  175. package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
  176. package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
  177. package/node/components/panel/GridPanel.js +3 -2
  178. package/node/components/panel/GridPanelWrapper.js +5 -3
  179. package/node/components/panel/filterPanel/GridFilterForm.js +3 -2
  180. package/node/components/panel/filterPanel/GridFilterInputValue.js +17 -10
  181. package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
  182. package/node/components/toolbar/GridToolbar.js +4 -4
  183. package/node/components/toolbar/GridToolbarColumnsButton.js +3 -2
  184. package/node/components/toolbar/GridToolbarDensitySelector.js +3 -2
  185. package/node/components/toolbar/GridToolbarExport.js +2 -1
  186. package/node/components/toolbar/GridToolbarExportContainer.js +3 -2
  187. package/node/components/toolbar/GridToolbarFilterButton.js +3 -2
  188. package/node/components/virtualization/GridMainContainer.js +4 -3
  189. package/node/components/virtualization/GridVirtualScrollbar.js +2 -1
  190. package/node/components/virtualization/GridVirtualScrollerContent.js +5 -5
  191. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
  192. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
  193. package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
  194. package/node/hooks/features/columnResize/useGridColumnResize.js +9 -4
  195. package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
  196. package/node/hooks/features/rows/useGridRowSpanning.js +13 -5
  197. package/node/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  198. package/node/index.js +1 -1
  199. package/node/internals/utils/useProps.js +3 -0
  200. package/node/locales/koKR.js +36 -39
  201. package/node/locales/nlNL.js +5 -6
  202. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,92 @@
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
+ ## v7.23.4
7
+
8
+ _Dec 27, 2024_
9
+
10
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Improve Dutch (nl-NL) locale on the Data Grid
13
+ - 🐞 Bugfixes
14
+
15
+ Special thanks go out to the community contributor who has helped make this release possible:
16
+ @JoepVerkoelen.
17
+ Following are all team members who have contributed to this release:
18
+ @arminmeh, @oliviertassinari.
19
+
20
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
21
+
22
+ ### Data Grid
23
+
24
+ #### `@mui/x-data-grid@7.23.4`
25
+
26
+ - [DataGrid] Fix header filters showing clear button while empty (#15990) @k-rajat19
27
+ - [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15984) @lauri865
28
+ - [l10n] Improve Dutch (nl-NL) locale (#15920) @JoepVerkoelen
29
+
30
+ #### `@mui/x-data-grid-pro@7.23.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@7.23.4`.
33
+
34
+ #### `@mui/x-data-grid-premium@7.23.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@7.23.4`, plus:
37
+
38
+ - [DataGridPremium] Fix column pinning with checkbox selection and row grouping (#15949) @k-rajat19
39
+
40
+ ### Docs
41
+
42
+ - [docs] Fix outdated link to handbook (#15855) @oliviertassinari
43
+
44
+ ## 7.23.3
45
+
46
+ _Dec 19, 2024_
47
+
48
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
49
+
50
+ - 🌍 Improve Korean (ko-KR) locale on the Data Grid
51
+ - 🐞 Bugfixes
52
+
53
+ Special thanks go out to the community contributors who have helped make this release possible:
54
+ @k-rajat19, @good-jinu.
55
+ Following are all team members who have contributed to this release:
56
+ @KenanYusuf, @MBilalShafi, @arminmeh, @flaviendelangle.
57
+
58
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
59
+
60
+ ### Data Grid
61
+
62
+ #### `@mui/x-data-grid@7.23.3`
63
+
64
+ - [DataGrid] Allow passing custom props to `.main` element (#15919) @MBilalShafi
65
+ - [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15927) @k-rajat19
66
+ - [DataGrid] Deprecate `indeterminateCheckboxAction` prop (#15862) @MBilalShafi
67
+ - [DataGrid] Fix `aria-label` value for group checkboxes (#15861) @MBilalShafi
68
+ - [DataGrid] Fix autosizing with virtualized columns (#15929) @k-rajat19
69
+ - [DataGrid] Round dimensions to avoid subpixel rendering error (#15873) @KenanYusuf
70
+ - [DataGrid] Toggle menu on click in `<GridActionsCell />` (#15871) @k-rajat19
71
+ - [DataGrid] Trigger row spanning computation on rows update (#15872) @MBilalShafi
72
+ - [l10n] Improve Korean (ko-KR) locale (#15906) @good-jinu
73
+
74
+ #### `@mui/x-data-grid-pro@7.23.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
75
+
76
+ Same changes as in `@mui/x-data-grid@7.23.3`.
77
+
78
+ #### `@mui/x-data-grid-premium@7.23.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
79
+
80
+ Same changes as in `@mui/x-data-grid-pro@7.23.3`.
81
+
82
+ ### Date and Time Pickers
83
+
84
+ #### `@mui/x-date-pickers@7.23.3`
85
+
86
+ - [pickers] Add verification to disable skipped hours in spring forward DST (#15918) @flaviendelangle
87
+
88
+ #### `@mui/x-date-pickers-pro@7.23.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
89
+
90
+ Same changes as in `@mui/x-date-pickers@7.23.3`.
91
+
6
92
  ## 7.23.2
7
93
 
8
94
  _Dec 12, 2024_
@@ -3,6 +3,7 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { forwardRef } from '@mui/x-internals/forwardRef';
6
7
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from "../components/index.js";
7
8
  import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
8
9
  import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
@@ -23,7 +24,7 @@ if (process.env.NODE_ENV !== 'production') {
23
24
  // Only validate in MIT version
24
25
  props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
25
26
  }
26
- const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
27
+ const DataGridRaw = forwardRef(function DataGrid(inProps, ref) {
27
28
  const props = useDataGridProps(inProps);
28
29
  const privateApiRef = useDataGridComponent(props.apiRef, props);
29
30
  if (process.env.NODE_ENV !== 'production') {
@@ -36,9 +37,9 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
36
37
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
37
38
  className: props.className,
38
39
  style: props.style,
39
- sx: props.sx,
40
- ref: ref
41
- }, props.forwardedProps, {
40
+ sx: props.sx
41
+ }, props.forwardedProps, props.slotProps?.root, {
42
+ ref: ref,
42
43
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
43
44
  }))
44
45
  });
@@ -95,6 +96,7 @@ DataGridRaw.propTypes = {
95
96
  */
96
97
  autosizeOptions: PropTypes.shape({
97
98
  columns: PropTypes.arrayOf(PropTypes.string),
99
+ disableColumnVirtualization: PropTypes.bool,
98
100
  expand: PropTypes.bool,
99
101
  includeHeaders: PropTypes.bool,
100
102
  includeOutliers: PropTypes.bool,
@@ -331,6 +333,7 @@ DataGridRaw.propTypes = {
331
333
  * If `deselect`, it will deselect all the rows under it.
332
334
  * Works only if `checkboxSelection` is enabled.
333
335
  * @default "deselect"
336
+ * @deprecated `select` will be the default behavior from v8 onwards
334
337
  */
335
338
  indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
336
339
  /**
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MUI X Data Grid
2
2
 
3
3
  This package is the Community plan edition of the Data Grid components.
4
- It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
@@ -3,5 +3,5 @@ import { UseGridColumnHeadersProps } from '../hooks/features/columnHeaders/useGr
3
3
  export interface GridColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement>, UseGridColumnHeadersProps {
4
4
  ref?: React.Ref<HTMLDivElement>;
5
5
  }
6
- declare const MemoizedGridColumnHeaders: React.ForwardRefExoticComponent<Omit<GridColumnHeadersProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const MemoizedGridColumnHeaders: React.ForwardRefExoticComponent<GridColumnHeadersProps> | React.ForwardRefExoticComponent<Omit<GridColumnHeadersProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  export { MemoizedGridColumnHeaders as GridColumnHeaders };
@@ -4,10 +4,11 @@ const _excluded = ["className", "visibleColumns", "sortColumnLookup", "filterCol
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { fastMemo } from '@mui/x-internals/fastMemo';
7
+ import { forwardRef } from '@mui/x-internals/forwardRef';
7
8
  import { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
8
9
  import { GridBaseColumnHeaders } from "./columnHeaders/GridBaseColumnHeaders.js";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
11
+ const GridColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
11
12
  const {
12
13
  visibleColumns,
13
14
  sortColumnLookup,
@@ -41,9 +42,8 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
41
42
  columnGroupsHeaderStructure,
42
43
  hasOtherElementInTabSequence
43
44
  });
44
- return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({
45
- ref: ref
46
- }, other, getInnerProps(), {
45
+ return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({}, other, getInnerProps(), {
46
+ ref: ref,
47
47
  children: [getColumnGroupHeadersRows(), getColumnHeadersRow()]
48
48
  }));
49
49
  });
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- declare const GridFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
2
+ import { GridFooterContainerProps } from './containers/GridFooterContainer';
3
+ declare const GridFooter: React.ForwardRefExoticComponent<GridFooterContainerProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
4
  sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
4
5
  } & React.RefAttributes<HTMLDivElement>>;
5
6
  export { GridFooter };
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { useGridSelector } from "../hooks/utils/useGridSelector.js";
5
6
  import { gridTopLevelRowCountSelector } from "../hooks/features/rows/gridRowsSelector.js";
6
7
  import { selectedGridRowsCountSelector } from "../hooks/features/rowSelection/gridRowSelectionSelector.js";
@@ -10,7 +11,7 @@ import { GridSelectedRowCount } from "./GridSelectedRowCount.js";
10
11
  import { GridFooterContainer } from "./containers/GridFooterContainer.js";
11
12
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
12
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
14
+ const GridFooter = forwardRef(function GridFooter(props, ref) {
14
15
  const apiRef = useGridApiContext();
15
16
  const rootProps = useGridRootProps();
16
17
  const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);
@@ -24,9 +25,8 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
24
25
  visibleRowCount: visibleTopLevelRowCount
25
26
  })) : null;
26
27
  const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));
27
- return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({
28
- ref: ref
29
- }, props, {
28
+ return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({}, props, {
29
+ ref: ref,
30
30
  children: [selectedRowCountElement, rowCountElement, paginationElement]
31
31
  }));
32
32
  });
@@ -13,5 +13,5 @@ export interface GridLoadingOverlayProps extends GridOverlayProps {
13
13
  */
14
14
  noRowsVariant?: GridLoadingOverlayVariant;
15
15
  }
16
- declare const GridLoadingOverlay: React.ForwardRefExoticComponent<GridLoadingOverlayProps & React.RefAttributes<HTMLDivElement>>;
16
+ declare const GridLoadingOverlay: React.ForwardRefExoticComponent<GridLoadingOverlayProps> | React.ForwardRefExoticComponent<GridLoadingOverlayProps & React.RefAttributes<HTMLDivElement>>;
17
17
  export { GridLoadingOverlay };
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import LinearProgress from '@mui/material/LinearProgress';
7
7
  import CircularProgress from '@mui/material/CircularProgress';
8
+ import { forwardRef } from '@mui/x-internals/forwardRef';
8
9
  import { GridOverlay } from "./containers/GridOverlay.js";
9
10
  import { GridSkeletonLoadingOverlay } from "./GridSkeletonLoadingOverlay.js";
10
11
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
@@ -28,7 +29,7 @@ const LOADING_VARIANTS = {
28
29
  }
29
30
  }
30
31
  };
31
- const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOverlay(props, ref) {
32
+ const GridLoadingOverlay = forwardRef(function GridLoadingOverlay(props, ref) {
32
33
  const {
33
34
  variant = 'circular-progress',
34
35
  noRowsVariant = 'circular-progress',
@@ -39,9 +40,9 @@ const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOve
39
40
  const rowsCount = useGridSelector(apiRef, gridRowCountSelector);
40
41
  const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];
41
42
  return /*#__PURE__*/_jsx(GridOverlay, _extends({
42
- ref: ref,
43
43
  style: _extends({}, activeVariant.style, style)
44
44
  }, other, {
45
+ ref: ref,
45
46
  children: /*#__PURE__*/_jsx(activeVariant.component, {})
46
47
  }));
47
48
  });
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const GridNoResultsOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
2
+ import { GridOverlayProps } from './containers/GridOverlay';
3
+ export declare const GridNoResultsOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
4
  sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
4
5
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1,14 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import { forwardRef } from '@mui/x-internals/forwardRef';
3
4
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
4
5
  import { GridOverlay } from "./containers/GridOverlay.js";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
- export const GridNoResultsOverlay = /*#__PURE__*/React.forwardRef(function GridNoResultsOverlay(props, ref) {
7
+ export const GridNoResultsOverlay = forwardRef(function GridNoResultsOverlay(props, ref) {
7
8
  const apiRef = useGridApiContext();
8
9
  const noResultsOverlayLabel = apiRef.current.getLocaleText('noResultsOverlayLabel');
9
- return /*#__PURE__*/_jsx(GridOverlay, _extends({
10
- ref: ref
11
- }, props, {
10
+ return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
11
+ ref: ref,
12
12
  children: noResultsOverlayLabel
13
13
  }));
14
14
  });
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- declare const GridNoRowsOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
2
+ import { GridOverlayProps } from './containers/GridOverlay';
3
+ declare const GridNoRowsOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
4
  sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
4
5
  } & React.RefAttributes<HTMLDivElement>>;
5
6
  export { GridNoRowsOverlay };
@@ -1,15 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
5
6
  import { GridOverlay } from "./containers/GridOverlay.js";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
- const GridNoRowsOverlay = /*#__PURE__*/React.forwardRef(function GridNoRowsOverlay(props, ref) {
8
+ const GridNoRowsOverlay = forwardRef(function GridNoRowsOverlay(props, ref) {
8
9
  const apiRef = useGridApiContext();
9
10
  const noRowsLabel = apiRef.current.getLocaleText('noRowsLabel');
10
- return /*#__PURE__*/_jsx(GridOverlay, _extends({
11
- ref: ref
12
- }, props, {
11
+ return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
12
+ ref: ref,
13
13
  children: noRowsLabel
14
14
  }));
15
15
  });
@@ -6,5 +6,5 @@ export type WrappedLabelDisplayedRows = (args: LabelDisplayedRowsArgs & {
6
6
  interface GridPaginationOwnProps {
7
7
  component?: React.ElementType;
8
8
  }
9
- declare const GridPagination: React.ForwardRefExoticComponent<Omit<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps, "ref"> & React.RefAttributes<unknown>>;
9
+ declare const GridPagination: React.ForwardRefExoticComponent<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps> | React.ForwardRefExoticComponent<Omit<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps, "ref"> & React.RefAttributes<unknown>>;
10
10
  export { GridPagination };
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import PropTypes from 'prop-types';
5
5
  import TablePagination, { tablePaginationClasses } from '@mui/material/TablePagination';
6
+ import { forwardRef } from '@mui/x-internals/forwardRef';
6
7
  import { useGridSelector } from "../hooks/utils/useGridSelector.js";
7
8
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
8
9
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
@@ -55,7 +56,7 @@ const defaultLabelDisplayedRows = ({
55
56
 
56
57
  // A mutable version of a readonly array.
57
58
 
58
- const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {
59
+ const GridPagination = forwardRef(function GridPagination(props, ref) {
59
60
  const apiRef = useGridApiContext();
60
61
  const rootProps = useGridRootProps();
61
62
  const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
@@ -119,7 +120,6 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
119
120
  const locales = apiRef.current.getLocaleText('MuiTablePagination');
120
121
  const wrappedLabelDisplayedRows = wrapLabelDisplayedRows(locales.labelDisplayedRows || defaultLabelDisplayedRows, estimatedRowCount);
121
122
  return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({
122
- ref: ref,
123
123
  component: "div",
124
124
  count: rowCount,
125
125
  page: computedPage
@@ -133,7 +133,9 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
133
133
  onRowsPerPageChange: handlePageSizeChange
134
134
  }, computedProps, locales, {
135
135
  labelDisplayedRows: wrappedLabelDisplayedRows
136
- }, props));
136
+ }, props, {
137
+ ref: ref
138
+ }));
137
139
  });
138
140
  process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
139
141
  // ----------------------------- Warning --------------------------------
@@ -40,5 +40,5 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
40
40
  onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
41
41
  [x: `data-${string}`]: string;
42
42
  }
43
- declare const MemoizedGridRow: React.ForwardRefExoticComponent<GridRowProps & React.RefAttributes<HTMLDivElement>>;
43
+ declare const MemoizedGridRow: React.ForwardRefExoticComponent<GridRowProps> | React.ForwardRefExoticComponent<GridRowProps & React.RefAttributes<HTMLDivElement>>;
44
44
  export { MemoizedGridRow as GridRow };
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { unstable_useForkRef as useForkRef } from '@mui/utils';
8
8
  import { fastMemo } from '@mui/x-internals/fastMemo';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { GridEditModes, GridRowModes, GridCellModes } from "../models/gridEditRowModel.js";
10
11
  import { gridClasses } from "../constants/gridClasses.js";
11
12
  import { composeGridClasses } from "../utils/composeGridClasses.js";
@@ -25,6 +26,7 @@ import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFille
25
26
  import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
26
27
  import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
27
28
  import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
29
+ import { gridVirtualizationColumnEnabledSelector } from "../hooks/index.js";
28
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
31
  function EmptyCell({
30
32
  width
@@ -47,7 +49,7 @@ process.env.NODE_ENV !== "production" ? EmptyCell.propTypes = {
47
49
  // ----------------------------------------------------------------------
48
50
  width: PropTypes.number.isRequired
49
51
  } : void 0;
50
- const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
52
+ const GridRow = forwardRef(function GridRow(props, refProp) {
51
53
  const {
52
54
  selected,
53
55
  rowId,
@@ -89,6 +91,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
89
91
  const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
90
92
  const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
91
93
  const editable = rootProps.editMode === GridEditModes.Row;
94
+ const hasColumnVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
92
95
  const hasFocusCell = focusedColumnIndex !== undefined;
93
96
  const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
94
97
  const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
@@ -270,7 +273,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
270
273
  if (hasVirtualFocusCellLeft) {
271
274
  cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedPosition.VIRTUAL));
272
275
  }
273
- for (let i = renderContext.firstColumnIndex; i < renderContext.lastColumnIndex; i += 1) {
276
+ let firstColumnIndex;
277
+ let lastColumnIndex;
278
+ if (!rootProps.disableVirtualization && !hasColumnVirtualization) {
279
+ firstColumnIndex = 0;
280
+ lastColumnIndex = visibleColumns.length;
281
+ } else {
282
+ firstColumnIndex = renderContext.firstColumnIndex;
283
+ lastColumnIndex = renderContext.lastColumnIndex;
284
+ }
285
+ for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {
274
286
  const column = visibleColumns[i];
275
287
  const indexInSection = i - pinnedColumns.left.length;
276
288
  if (!column) {
@@ -292,13 +304,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
292
304
  const expandedWidth = dimensions.viewportOuterSize.width - dimensions.columnsTotalWidth - scrollbarWidth;
293
305
  const emptyCellWidth = Math.max(0, expandedWidth);
294
306
  return /*#__PURE__*/_jsxs("div", _extends({
295
- ref: handleRef,
296
307
  "data-id": rowId,
297
308
  "data-rowindex": index,
298
309
  role: "row",
299
310
  className: clsx(...rowClassNames, classes.root, className),
300
311
  style: style
301
312
  }, ariaAttributes, eventHandlers, other, {
313
+ ref: handleRef,
302
314
  children: [leftCells, /*#__PURE__*/_jsx("div", {
303
315
  role: "presentation",
304
316
  className: gridClasses.cellOffsetLeft,
@@ -7,7 +7,7 @@ interface RowCountProps {
7
7
  export type GridRowCountProps = React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
8
8
  sx?: SxProps<Theme>;
9
9
  };
10
- declare const GridRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
10
+ declare const GridRowCount: React.ForwardRefExoticComponent<GridRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
11
11
  sx?: SxProps<Theme>;
12
12
  } & React.RefAttributes<HTMLDivElement>>;
13
13
  export { GridRowCount };
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import { styled } from '@mui/system';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
10
11
  import { getDataGridUtilityClass } from "../constants/gridClasses.js";
11
12
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
@@ -30,7 +31,7 @@ const GridRowCountRoot = styled('div', {
30
31
  display: 'flex',
31
32
  margin: theme.spacing(0, 2)
32
33
  }));
33
- const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props, ref) {
34
+ const GridRowCount = forwardRef(function GridRowCount(props, ref) {
34
35
  const {
35
36
  className,
36
37
  rowCount,
@@ -45,10 +46,10 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
45
46
  }
46
47
  const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText('footerTotalVisibleRows')(visibleRowCount, rowCount) : rowCount.toLocaleString();
47
48
  return /*#__PURE__*/_jsxs(GridRowCountRoot, _extends({
48
- ref: ref,
49
49
  className: clsx(classes.root, className),
50
50
  ownerState: ownerState
51
51
  }, other, {
52
+ ref: ref,
52
53
  children: [apiRef.current.getLocaleText('footerTotalRows'), " ", text]
53
54
  }));
54
55
  });
@@ -3,7 +3,10 @@ import { SxProps, Theme } from '@mui/system';
3
3
  interface SelectedRowCountProps {
4
4
  selectedRowCount: number;
5
5
  }
6
- declare const GridSelectedRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
6
+ type GridSelectedRowCountProps = React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
7
+ sx?: SxProps<Theme>;
8
+ };
9
+ declare const GridSelectedRowCount: React.ForwardRefExoticComponent<GridSelectedRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
7
10
  sx?: SxProps<Theme>;
8
11
  } & React.RefAttributes<HTMLDivElement>>;
9
12
  export { GridSelectedRowCount };
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import { styled } from '@mui/system';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
10
11
  import { getDataGridUtilityClass } from "../constants/gridClasses.js";
11
12
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
@@ -38,7 +39,7 @@ const GridSelectedRowCountRoot = styled('div', {
38
39
  height: 'auto'
39
40
  }
40
41
  }));
41
- const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelectedRowCount(props, ref) {
42
+ const GridSelectedRowCount = forwardRef(function GridSelectedRowCount(props, ref) {
42
43
  const {
43
44
  className,
44
45
  selectedRowCount
@@ -49,10 +50,10 @@ const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelected
49
50
  const classes = useUtilityClasses(ownerState);
50
51
  const rowSelectedText = apiRef.current.getLocaleText('footerRowSelected')(selectedRowCount);
51
52
  return /*#__PURE__*/_jsx(GridSelectedRowCountRoot, _extends({
52
- ref: ref,
53
53
  className: clsx(classes.root, className),
54
54
  ownerState: ownerState
55
55
  }, other, {
56
+ ref: ref,
56
57
  children: rowSelectedText
57
58
  }));
58
59
  });
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
- declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
2
+ declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement>> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
3
  export { GridSkeletonLoadingOverlay };
@@ -4,6 +4,7 @@ import clsx from 'clsx';
4
4
  import { styled } from '@mui/system';
5
5
  import useForkRef from '@mui/utils/useForkRef';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
+ import { forwardRef } from '@mui/x-internals/forwardRef';
7
8
  import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
8
9
  import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
9
10
  import { GridPinnedColumnPosition, gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
@@ -34,7 +35,7 @@ const useUtilityClasses = ownerState => {
34
35
  return composeClasses(slots, getDataGridUtilityClass, classes);
35
36
  };
36
37
  const getColIndex = el => parseInt(el.getAttribute('data-colindex'), 10);
37
- const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {
38
+ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {
38
39
  const rootProps = useGridRootProps();
39
40
  const {
40
41
  slots
@@ -172,9 +173,9 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
172
173
  };
173
174
  useGridApiEventHandler(apiRef, 'columnResize', handleColumnResize);
174
175
  return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({
175
- className: classes.root,
176
- ref: handleRef
176
+ className: classes.root
177
177
  }, props, {
178
+ ref: handleRef,
178
179
  children: children
179
180
  }));
180
181
  });
@@ -90,6 +90,13 @@ function GridActionsCell(props) {
90
90
  const hideMenu = () => {
91
91
  setOpen(false);
92
92
  };
93
+ const toggleMenu = () => {
94
+ if (open) {
95
+ hideMenu();
96
+ } else {
97
+ showMenu();
98
+ }
99
+ };
93
100
  const handleTouchRippleRef = index => instance => {
94
101
  touchRippleRefs.current[index] = instance;
95
102
  };
@@ -160,7 +167,7 @@ function GridActionsCell(props) {
160
167
  "aria-controls": open ? menuId : undefined,
161
168
  role: "menuitem",
162
169
  size: "small",
163
- onClick: showMenu,
170
+ onClick: toggleMenu,
164
171
  touchRippleRef: handleTouchRippleRef(buttonId),
165
172
  tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
166
173
  }, rootProps.slotProps?.baseIconButton, {
@@ -19,7 +19,7 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
19
19
  closeMenuOnClick?: boolean;
20
20
  closeMenu?: () => void;
21
21
  } & Omit<MenuItemProps, 'component'>));
22
- declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
22
+ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
23
23
  showInMenu?: false;
24
24
  icon: React.ReactElement;
25
25
  } & Omit<IconButtonProps, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
@@ -6,9 +6,10 @@ import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import MenuItem from '@mui/material/MenuItem';
8
8
  import ListItemIcon from '@mui/material/ListItemIcon';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
12
+ const GridActionsCellItem = forwardRef((props, ref) => {
12
13
  const rootProps = useGridRootProps();
13
14
  if (!props.showInMenu) {
14
15
  const {
@@ -21,13 +22,13 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
21
22
  onClick?.(event);
22
23
  };
23
24
  return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
24
- ref: ref,
25
25
  size: "small",
26
26
  role: "menuitem",
27
27
  "aria-label": label
28
28
  }, other, {
29
29
  onClick: handleClick
30
30
  }, rootProps.slotProps?.baseIconButton, {
31
+ ref: ref,
31
32
  children: /*#__PURE__*/React.cloneElement(icon, {
32
33
  fontSize: 'small'
33
34
  })
@@ -46,7 +46,7 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
46
46
  style?: React.CSSProperties;
47
47
  [x: `data-${string}`]: string;
48
48
  };
49
- declare const MemoizedGridCell: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
49
+ declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
50
50
  [x: `data-${string}`]: string;
51
51
  align: GridAlignment;
52
52
  className?: string;