@mui/x-data-grid-pro 7.1.1 → 7.2.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.
- package/CHANGELOG.md +86 -0
- package/components/headerFiltering/GridHeaderFilterCell.d.ts +1 -0
- package/components/headerFiltering/GridHeaderFilterCell.js +5 -3
- package/esm/components/headerFiltering/GridHeaderFilterCell.js +5 -3
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -3
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/index.js +1 -1
- package/modern/components/headerFiltering/GridHeaderFilterCell.js +5 -3
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -3
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/utils/releaseInfo.js +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
|
+
## 7.2.0
|
|
7
|
+
|
|
8
|
+
_Apr 12, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Make grid colors customizable through the MUI themes API
|
|
13
|
+
- 🌍 Improve French (fr-FR), German (de-DE), and Swedish (sv-SE) locales on the Data Grid and Pickers
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### Data Grid
|
|
18
|
+
|
|
19
|
+
#### `@mui/x-data-grid@7.2.0`
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Add missing `api` property to `GridCallbackDetails` (#12742) @sai6855
|
|
22
|
+
- [DataGrid] Do not escape double quotes when copying to clipboard (#12722) @cherniavskii
|
|
23
|
+
- [DataGrid] Fix column vertical border (#12741) @romgrk
|
|
24
|
+
- [DataGrid] Fix invalid date error when filtering `date`/`dateTime` columns (#12709) @cherniavskii
|
|
25
|
+
- [DataGrid] Fix overflow with dynamic row height (#12683) @romgrk
|
|
26
|
+
- [DataGrid] Make colors customizable (#12614) @romgrk
|
|
27
|
+
- [l10n] Improve French (fr-FR) locale (#12755) @derek-0000
|
|
28
|
+
- [l10n] Improve German (de-DE) locale (#12752) @Jens-Schoen
|
|
29
|
+
- [l10n] Improve Swedish (sv-SE) locale (#12731) @pontusdacke
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.2.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.2.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.2.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.2.0`, plus:
|
|
38
|
+
|
|
39
|
+
- [DataGridPremium] Fix clipboard paste not working when cell loses focus (#12724) @cherniavskii
|
|
40
|
+
|
|
41
|
+
### Date and Time Pickers
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers@7.2.0`
|
|
44
|
+
|
|
45
|
+
- [fields] Fix field editing after closing the picker (#12675) @LukasTy
|
|
46
|
+
- [l10n] Improve French (fr-FR) locale (#12692) @FaroukBel
|
|
47
|
+
- [l10n] Improve German (de-DE) locale (#12752) @Jens-Schoen
|
|
48
|
+
- [l10n] Improve Swedish (sv-SE) locale (#12731) @pontusdacke
|
|
49
|
+
- [pickers] Fix desktop date time Pickers grid layout (#12748) @LukasTy
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers-pro@7.2.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
52
|
+
|
|
53
|
+
Same changes as in `@mui/x-date-pickers@7.2.0`, plus:
|
|
54
|
+
|
|
55
|
+
- [DateTimeRangePicker] Fix desktop toolbar style (#12760) @LukasTy
|
|
56
|
+
|
|
57
|
+
### Charts
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts@7.2.0`
|
|
60
|
+
|
|
61
|
+
- [charts] Fix Bar chart with empty dataset throwing an error (#12708) @JCQuintas
|
|
62
|
+
- [charts] Fix `tickLabelInterval` not working on `YAxis` (#12746) @JCQuintas
|
|
63
|
+
|
|
64
|
+
### Tree View
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-tree-view@7.2.0`
|
|
67
|
+
|
|
68
|
+
- [TreeView] Add a new lookup to access an item index without expansive computation (#12729) @flaviendelangle
|
|
69
|
+
- [TreeView] Clean up usage of term "node" in internals (#12655) @noraleonte
|
|
70
|
+
- [TreeView] Improve performance by removing `getNavigableChildrenIds` method (#12713) @flaviendelangle
|
|
71
|
+
- [TreeView] Remove `state.items.itemTree` (#12717) @flaviendelangle
|
|
72
|
+
- [TreeView] Remove remaining occurences of the word "node" in the codebase (#12712) @flaviendelangle
|
|
73
|
+
- [TreeView] Return `instance` and `publicAPI` methods from plugin and populate the main objects inside `useTreeView` (#12650) @flaviendelangle
|
|
74
|
+
- [TreeView] Fix behaviors when the item order changes (#12369) @flaviendelangle
|
|
75
|
+
|
|
76
|
+
### Docs
|
|
77
|
+
|
|
78
|
+
- [docs] Add `AxisFormatter` documentation for customizing tick/tooltip value formatting (#12700) @JCQuintas
|
|
79
|
+
- [docs] Add file explorer example to rich tree view customization docs (#12707) @noraleonte
|
|
80
|
+
- [docs] Do not use import of depth 3 in the doc (#12716) @flaviendelangle
|
|
81
|
+
- [docs] Explain how to clip plots with composition (#12679) @alexfauquette
|
|
82
|
+
- [docs] Fix typo in Data Grid v7 migration page (#12720) @bfaulk96
|
|
83
|
+
- [docs] Fix typo in Pickers v7 migration page (#12721) @bfaulk96
|
|
84
|
+
|
|
85
|
+
### Core
|
|
86
|
+
|
|
87
|
+
- [core] Support multiple resolved `l10n` PR packages (#12735) @LukasTy
|
|
88
|
+
- [core] Update Netlify release references in release README (#12687) @LukasTy
|
|
89
|
+
- [core] Use `describeTreeView` for icons tests (#12672) @flaviendelangle
|
|
90
|
+
- [core] Use `describeTreeView` in existing tests for `useTreeViewItems` (#12732) @flaviendelangle
|
|
91
|
+
|
|
6
92
|
## 7.1.1
|
|
7
93
|
|
|
8
94
|
_Apr 5, 2024_
|
|
@@ -20,6 +20,7 @@ export interface GridHeaderFilterCellProps extends Pick<GridStateColDef, 'header
|
|
|
20
20
|
style?: React.CSSProperties;
|
|
21
21
|
indexInSection: number;
|
|
22
22
|
sectionLength: number;
|
|
23
|
+
gridHasFiller: boolean;
|
|
23
24
|
}
|
|
24
25
|
declare const Memoized: React.ForwardRefExoticComponent<GridHeaderFilterCellProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
26
|
export { Memoized as GridHeaderFilterCell };
|
|
@@ -17,7 +17,7 @@ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
|
17
17
|
var _GridHeaderFilterMenuContainer = require("./GridHeaderFilterMenuContainer");
|
|
18
18
|
var _GridHeaderFilterClearButton = require("./GridHeaderFilterClearButton");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength"];
|
|
20
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength", "gridHasFiller"];
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
const useUtilityClasses = ownerState => {
|
|
@@ -53,7 +53,8 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
53
53
|
pinnedPosition,
|
|
54
54
|
style: styleProp,
|
|
55
55
|
indexInSection,
|
|
56
|
-
sectionLength
|
|
56
|
+
sectionLength,
|
|
57
|
+
gridHasFiller
|
|
57
58
|
} = props,
|
|
58
59
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
59
60
|
const apiRef = (0, _internals.useGridPrivateApiContext)();
|
|
@@ -172,7 +173,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
172
173
|
onBlur: publish('headerFilterBlur')
|
|
173
174
|
}), [onMouseDown, onKeyDown, publish]);
|
|
174
175
|
const showLeftBorder = (0, _internals.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
175
|
-
const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder);
|
|
176
|
+
const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
176
177
|
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
177
178
|
pinnedPosition,
|
|
178
179
|
colDef,
|
|
@@ -252,6 +253,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
252
253
|
// ----------------------------------------------------------------------
|
|
253
254
|
colDef: _propTypes.default.object.isRequired,
|
|
254
255
|
colIndex: _propTypes.default.number.isRequired,
|
|
256
|
+
gridHasFiller: _propTypes.default.bool.isRequired,
|
|
255
257
|
hasFocus: _propTypes.default.bool,
|
|
256
258
|
/**
|
|
257
259
|
* Class name that will be added in the column header cell.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength"];
|
|
3
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength", "gridHasFiller"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -45,7 +45,8 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
45
45
|
pinnedPosition,
|
|
46
46
|
style: styleProp,
|
|
47
47
|
indexInSection,
|
|
48
|
-
sectionLength
|
|
48
|
+
sectionLength,
|
|
49
|
+
gridHasFiller
|
|
49
50
|
} = props,
|
|
50
51
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
52
|
const apiRef = useGridPrivateApiContext();
|
|
@@ -164,7 +165,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
164
165
|
onBlur: publish('headerFilterBlur')
|
|
165
166
|
}), [onMouseDown, onKeyDown, publish]);
|
|
166
167
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
167
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder);
|
|
168
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
168
169
|
const ownerState = _extends({}, rootProps, {
|
|
169
170
|
pinnedPosition,
|
|
170
171
|
colDef,
|
|
@@ -244,6 +245,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
244
245
|
// ----------------------------------------------------------------------
|
|
245
246
|
colDef: PropTypes.object.isRequired,
|
|
246
247
|
colIndex: PropTypes.number.isRequired,
|
|
248
|
+
gridHasFiller: PropTypes.bool.isRequired,
|
|
247
249
|
hasFocus: PropTypes.bool,
|
|
248
250
|
/**
|
|
249
251
|
* Class name that will be added in the column header cell.
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["getColumnsToRender", "renderContext", "leftRenderContext", "rightRenderContext", "pinnedColumns", "visibleColumns", "getCellOffsetStyle"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass, GridPinnedColumnPosition } from '@mui/x-data-grid';
|
|
5
|
+
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass, GridPinnedColumnPosition, gridDimensionsSelector } from '@mui/x-data-grid';
|
|
6
6
|
import { useGridColumnHeaders as useGridColumnHeadersCommunity, useGridPrivateApiContext, getGridFilter, GridColumnHeaderRow } from '@mui/x-data-grid/internals';
|
|
7
7
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
8
|
import { useGridRootProps } from '../../utils/useGridRootProps';
|
|
@@ -48,8 +48,9 @@ export const useGridColumnHeaders = props => {
|
|
|
48
48
|
const rootProps = useGridRootProps();
|
|
49
49
|
const classes = useUtilityClasses(rootProps);
|
|
50
50
|
const disableHeaderFiltering = !rootProps.headerFilters;
|
|
51
|
-
const dimensions = apiRef
|
|
51
|
+
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
52
52
|
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
|
53
|
+
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
53
54
|
const columnHeaderFilterFocus = useGridSelector(apiRef, gridFocusColumnHeaderFilterSelector);
|
|
54
55
|
const getFilterItem = React.useCallback(colDef => {
|
|
55
56
|
const filterModelItem = filterModel?.items.find(it => it.field === colDef.field && it.operator !== 'isAnyOf');
|
|
@@ -105,7 +106,8 @@ export const useGridColumnHeaders = props => {
|
|
|
105
106
|
pinnedPosition: pinnedPosition,
|
|
106
107
|
style: style,
|
|
107
108
|
indexInSection: i,
|
|
108
|
-
sectionLength: renderedColumns.length
|
|
109
|
+
sectionLength: renderedColumns.length,
|
|
110
|
+
gridHasFiller: gridHasFiller
|
|
109
111
|
}, rootProps.slotProps?.headerFilterCell), `${colDef.field}-filter`));
|
|
110
112
|
}
|
|
111
113
|
return otherProps.getFillers(params, filters, 0, true);
|
package/esm/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxMjg2OTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -56,8 +56,9 @@ const useGridColumnHeaders = props => {
|
|
|
56
56
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
57
57
|
const classes = useUtilityClasses(rootProps);
|
|
58
58
|
const disableHeaderFiltering = !rootProps.headerFilters;
|
|
59
|
-
const dimensions = apiRef.
|
|
59
|
+
const dimensions = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridDimensionsSelector);
|
|
60
60
|
const filterModel = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridFilterModelSelector);
|
|
61
|
+
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
61
62
|
const columnHeaderFilterFocus = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridFocusColumnHeaderFilterSelector);
|
|
62
63
|
const getFilterItem = React.useCallback(colDef => {
|
|
63
64
|
const filterModelItem = filterModel?.items.find(it => it.field === colDef.field && it.operator !== 'isAnyOf');
|
|
@@ -113,7 +114,8 @@ const useGridColumnHeaders = props => {
|
|
|
113
114
|
pinnedPosition: pinnedPosition,
|
|
114
115
|
style: style,
|
|
115
116
|
indexInSection: i,
|
|
116
|
-
sectionLength: renderedColumns.length
|
|
117
|
+
sectionLength: renderedColumns.length,
|
|
118
|
+
gridHasFiller: gridHasFiller
|
|
117
119
|
}, rootProps.slotProps?.headerFilterCell), `${colDef.field}-filter`));
|
|
118
120
|
}
|
|
119
121
|
return otherProps.getFillers(params, filters, 0, true);
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength"];
|
|
3
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "style", "indexInSection", "sectionLength", "gridHasFiller"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -45,7 +45,8 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
45
45
|
pinnedPosition,
|
|
46
46
|
style: styleProp,
|
|
47
47
|
indexInSection,
|
|
48
|
-
sectionLength
|
|
48
|
+
sectionLength,
|
|
49
|
+
gridHasFiller
|
|
49
50
|
} = props,
|
|
50
51
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
52
|
const apiRef = useGridPrivateApiContext();
|
|
@@ -164,7 +165,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
164
165
|
onBlur: publish('headerFilterBlur')
|
|
165
166
|
}), [onMouseDown, onKeyDown, publish]);
|
|
166
167
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
167
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder);
|
|
168
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
168
169
|
const ownerState = _extends({}, rootProps, {
|
|
169
170
|
pinnedPosition,
|
|
170
171
|
colDef,
|
|
@@ -244,6 +245,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
244
245
|
// ----------------------------------------------------------------------
|
|
245
246
|
colDef: PropTypes.object.isRequired,
|
|
246
247
|
colIndex: PropTypes.number.isRequired,
|
|
248
|
+
gridHasFiller: PropTypes.bool.isRequired,
|
|
247
249
|
hasFocus: PropTypes.bool,
|
|
248
250
|
/**
|
|
249
251
|
* Class name that will be added in the column header cell.
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["getColumnsToRender", "renderContext", "leftRenderContext", "rightRenderContext", "pinnedColumns", "visibleColumns", "getCellOffsetStyle"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass, GridPinnedColumnPosition } from '@mui/x-data-grid';
|
|
5
|
+
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass, GridPinnedColumnPosition, gridDimensionsSelector } from '@mui/x-data-grid';
|
|
6
6
|
import { useGridColumnHeaders as useGridColumnHeadersCommunity, useGridPrivateApiContext, getGridFilter, GridColumnHeaderRow } from '@mui/x-data-grid/internals';
|
|
7
7
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
8
|
import { useGridRootProps } from '../../utils/useGridRootProps';
|
|
@@ -48,8 +48,9 @@ export const useGridColumnHeaders = props => {
|
|
|
48
48
|
const rootProps = useGridRootProps();
|
|
49
49
|
const classes = useUtilityClasses(rootProps);
|
|
50
50
|
const disableHeaderFiltering = !rootProps.headerFilters;
|
|
51
|
-
const dimensions = apiRef
|
|
51
|
+
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
52
52
|
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
|
53
|
+
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
53
54
|
const columnHeaderFilterFocus = useGridSelector(apiRef, gridFocusColumnHeaderFilterSelector);
|
|
54
55
|
const getFilterItem = React.useCallback(colDef => {
|
|
55
56
|
const filterModelItem = filterModel?.items.find(it => it.field === colDef.field && it.operator !== 'isAnyOf');
|
|
@@ -105,7 +106,8 @@ export const useGridColumnHeaders = props => {
|
|
|
105
106
|
pinnedPosition: pinnedPosition,
|
|
106
107
|
style: style,
|
|
107
108
|
indexInSection: i,
|
|
108
|
-
sectionLength: renderedColumns.length
|
|
109
|
+
sectionLength: renderedColumns.length,
|
|
110
|
+
gridHasFiller: gridHasFiller
|
|
109
111
|
}, rootProps.slotProps?.headerFilterCell), `${colDef.field}-filter`));
|
|
110
112
|
}
|
|
111
113
|
return otherProps.getFillers(params, filters, 0, true);
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxMjg2OTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "The Pro plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@babel/runtime": "^7.24.0",
|
|
36
36
|
"@mui/system": "^5.15.14",
|
|
37
37
|
"@mui/utils": "^5.15.14",
|
|
38
|
-
"@mui/x-data-grid": "7.
|
|
39
|
-
"@mui/x-license": "7.
|
|
38
|
+
"@mui/x-data-grid": "7.2.0",
|
|
39
|
+
"@mui/x-license": "7.2.0",
|
|
40
40
|
"@types/format-util": "^1.0.4",
|
|
41
41
|
"clsx": "^2.1.0",
|
|
42
42
|
"prop-types": "^15.8.1",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTcxMjg2OTIwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|