@mui/x-data-grid 7.27.2 → 7.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,48 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.27.3
7
+
8
+ _Mar 7, 2025_
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
+ - 🐞 Bugfixes
13
+
14
+ Team members who have contributed to this release:
15
+ @arminmeh, @cherniavskii, @LukasTy, @michelengelen.
16
+
17
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
18
+
19
+ ### Data Grid
20
+
21
+ #### `@mui/x-data-grid@7.27.3`
22
+
23
+ - [DataGrid] Fix `aria-hidden` console error when scrollbar is dragged (#16834) @arminmeh
24
+ - [DataGrid] Fix scroll jump with dynamic row height (#16801) @cherniavskii
25
+
26
+ #### `@mui/x-data-grid-pro@7.27.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
27
+
28
+ Same changes as in `@mui/x-data-grid@7.27.3`.
29
+
30
+ #### `@mui/x-data-grid-premium@7.27.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
31
+
32
+ Same changes as in `@mui/x-data-grid-pro@7.27.3`.
33
+
34
+ ### Date and Time Pickers
35
+
36
+ #### `@mui/x-date-pickers@7.27.3`
37
+
38
+ - [fields] Fix Fields aria relationship with `helperText` (#16828) @LukasTy
39
+
40
+ #### `@mui/x-date-pickers-pro@7.27.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
41
+
42
+ Same changes as in `@mui/x-date-pickers@7.27.3`.
43
+
44
+ ### Core
45
+
46
+ - [infra] Update contributor acknowledgment wording (#16753) @michelengelen
47
+
6
48
  ## 7.27.2
7
49
 
8
50
  <!-- generated comparing v7.27.1..v7.x -->
@@ -130,7 +130,13 @@ const GridVirtualScrollbar = forwardRef(function GridVirtualScrollbar(props, ref
130
130
  top: 0
131
131
  } : undefined,
132
132
  tabIndex: -1,
133
- "aria-hidden": "true",
133
+ "aria-hidden": "true"
134
+ // tabIndex does not prevent focus with a mouse click, throwing a console error
135
+ // https://github.com/mui/mui-x/issues/16706
136
+ ,
137
+ onFocus: event => {
138
+ event.target.blur();
139
+ },
134
140
  children: /*#__PURE__*/_jsx("div", {
135
141
  ref: contentRef,
136
142
  className: classes.content
@@ -13,6 +13,7 @@ import { useGridRegisterPipeApplier } from "../../core/pipeProcessing/index.js";
13
13
  import { gridPinnedRowsSelector, gridRowCountSelector } from "./gridRowsSelector.js";
14
14
  import { gridDimensionsSelector, gridRowHeightSelector } from "../dimensions/gridDimensionsSelectors.js";
15
15
  import { getValidRowHeight, getRowHeightWarning } from "./gridRowsUtils.js";
16
+ import { gridFocusedVirtualCellSelector } from "../virtualization/gridFocusedVirtualCellSelector.js";
16
17
  /* eslint-disable no-underscore-dangle */
17
18
 
18
19
  export const rowsMetaStateInitializer = (state, props, apiRef) => {
@@ -183,6 +184,13 @@ export const useGridRowsMeta = (apiRef, props) => {
183
184
  const entry = entries[i];
184
185
  const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;
185
186
  const rowId = entry.target.__mui_id;
187
+ const focusedVirtualRowId = gridFocusedVirtualCellSelector(apiRef)?.id;
188
+ if (focusedVirtualRowId === rowId && height === 0) {
189
+ // Focused virtual row has 0 height.
190
+ // We don't want to store it to avoid scroll jumping.
191
+ // https://github.com/mui/mui-x/issues/14726
192
+ return;
193
+ }
186
194
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
187
195
  }
188
196
  if (!isHeightMetaValid.current) {
@@ -33,7 +33,6 @@ export declare const useGridVirtualScroller: () => {
33
33
  };
34
34
  getScrollbarVerticalProps: () => {
35
35
  ref: React.RefObject<HTMLDivElement | null>;
36
- role: string;
37
36
  scrollPosition: React.RefObject<{
38
37
  top: number;
39
38
  left: number;
@@ -41,7 +40,6 @@ export declare const useGridVirtualScroller: () => {
41
40
  };
42
41
  getScrollbarHorizontalProps: () => {
43
42
  ref: React.RefObject<HTMLDivElement | null>;
44
- role: string;
45
43
  scrollPosition: React.RefObject<{
46
44
  top: number;
47
45
  left: number;
@@ -524,12 +524,10 @@ export const useGridVirtualScroller = () => {
524
524
  }),
525
525
  getScrollbarVerticalProps: () => ({
526
526
  ref: scrollbarVerticalRef,
527
- role: 'presentation',
528
527
  scrollPosition
529
528
  }),
530
529
  getScrollbarHorizontalProps: () => ({
531
530
  ref: scrollbarHorizontalRef,
532
- role: 'presentation',
533
531
  scrollPosition
534
532
  }),
535
533
  getScrollAreaProps: () => ({
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.27.2
2
+ * @mui/x-data-grid v7.27.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -130,7 +130,13 @@ const GridVirtualScrollbar = forwardRef(function GridVirtualScrollbar(props, ref
130
130
  top: 0
131
131
  } : undefined,
132
132
  tabIndex: -1,
133
- "aria-hidden": "true",
133
+ "aria-hidden": "true"
134
+ // tabIndex does not prevent focus with a mouse click, throwing a console error
135
+ // https://github.com/mui/mui-x/issues/16706
136
+ ,
137
+ onFocus: event => {
138
+ event.target.blur();
139
+ },
134
140
  children: /*#__PURE__*/_jsx("div", {
135
141
  ref: contentRef,
136
142
  className: classes.content
@@ -13,6 +13,7 @@ import { useGridRegisterPipeApplier } from "../../core/pipeProcessing/index.js";
13
13
  import { gridPinnedRowsSelector, gridRowCountSelector } from "./gridRowsSelector.js";
14
14
  import { gridDimensionsSelector, gridRowHeightSelector } from "../dimensions/gridDimensionsSelectors.js";
15
15
  import { getValidRowHeight, getRowHeightWarning } from "./gridRowsUtils.js";
16
+ import { gridFocusedVirtualCellSelector } from "../virtualization/gridFocusedVirtualCellSelector.js";
16
17
  /* eslint-disable no-underscore-dangle */
17
18
 
18
19
  export const rowsMetaStateInitializer = (state, props, apiRef) => {
@@ -183,6 +184,13 @@ export const useGridRowsMeta = (apiRef, props) => {
183
184
  const entry = entries[i];
184
185
  const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;
185
186
  const rowId = entry.target.__mui_id;
187
+ const focusedVirtualRowId = gridFocusedVirtualCellSelector(apiRef)?.id;
188
+ if (focusedVirtualRowId === rowId && height === 0) {
189
+ // Focused virtual row has 0 height.
190
+ // We don't want to store it to avoid scroll jumping.
191
+ // https://github.com/mui/mui-x/issues/14726
192
+ return;
193
+ }
186
194
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
187
195
  }
188
196
  if (!isHeightMetaValid.current) {
@@ -524,12 +524,10 @@ export const useGridVirtualScroller = () => {
524
524
  }),
525
525
  getScrollbarVerticalProps: () => ({
526
526
  ref: scrollbarVerticalRef,
527
- role: 'presentation',
528
527
  scrollPosition
529
528
  }),
530
529
  getScrollbarHorizontalProps: () => ({
531
530
  ref: scrollbarHorizontalRef,
532
- role: 'presentation',
533
531
  scrollPosition
534
532
  }),
535
533
  getScrollAreaProps: () => ({
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.27.2
2
+ * @mui/x-data-grid v7.27.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -137,7 +137,13 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = (0, _forwardRef.forw
137
137
  top: 0
138
138
  } : undefined,
139
139
  tabIndex: -1,
140
- "aria-hidden": "true",
140
+ "aria-hidden": "true"
141
+ // tabIndex does not prevent focus with a mouse click, throwing a console error
142
+ // https://github.com/mui/mui-x/issues/16706
143
+ ,
144
+ onFocus: event => {
145
+ event.target.blur();
146
+ },
141
147
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
142
148
  ref: contentRef,
143
149
  className: classes.content
@@ -21,6 +21,7 @@ var _pipeProcessing = require("../../core/pipeProcessing");
21
21
  var _gridRowsSelector = require("./gridRowsSelector");
22
22
  var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
23
23
  var _gridRowsUtils = require("./gridRowsUtils");
24
+ var _gridFocusedVirtualCellSelector = require("../virtualization/gridFocusedVirtualCellSelector");
24
25
  /* eslint-disable no-underscore-dangle */
25
26
 
26
27
  const rowsMetaStateInitializer = (state, props, apiRef) => {
@@ -192,6 +193,13 @@ const useGridRowsMeta = (apiRef, props) => {
192
193
  const entry = entries[i];
193
194
  const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;
194
195
  const rowId = entry.target.__mui_id;
196
+ const focusedVirtualRowId = (0, _gridFocusedVirtualCellSelector.gridFocusedVirtualCellSelector)(apiRef)?.id;
197
+ if (focusedVirtualRowId === rowId && height === 0) {
198
+ // Focused virtual row has 0 height.
199
+ // We don't want to store it to avoid scroll jumping.
200
+ // https://github.com/mui/mui-x/issues/14726
201
+ return;
202
+ }
195
203
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
196
204
  }
197
205
  if (!isHeightMetaValid.current) {
@@ -535,12 +535,10 @@ const useGridVirtualScroller = () => {
535
535
  }),
536
536
  getScrollbarVerticalProps: () => ({
537
537
  ref: scrollbarVerticalRef,
538
- role: 'presentation',
539
538
  scrollPosition
540
539
  }),
541
540
  getScrollbarHorizontalProps: () => ({
542
541
  ref: scrollbarHorizontalRef,
543
- role: 'presentation',
544
542
  scrollPosition
545
543
  }),
546
544
  getScrollAreaProps: () => ({
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.27.2
2
+ * @mui/x-data-grid v7.27.3
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": "7.27.2",
3
+ "version": "7.27.3",
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",