@mui/x-data-grid-pro 6.9.0 → 6.9.2
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 +136 -8
- package/DataGridPro/DataGridPro.js +4 -1
- package/DataGridPro/useDataGridProComponent.js +1 -1
- package/README.md +1 -1
- package/components/headerFiltering/GridHeaderFilterCell.js +1 -0
- package/components/headerFiltering/GridHeaderFilterMenu.js +1 -0
- package/components/headerFiltering/GridHeaderFilterMenuContainer.js +1 -0
- package/hooks/features/columnPinning/useGridColumnPinning.js +5 -1
- package/hooks/features/treeData/gridTreeDataUtils.js +8 -5
- package/index.js +1 -1
- package/legacy/DataGridPro/DataGridPro.js +4 -1
- package/legacy/DataGridPro/useDataGridProComponent.js +1 -1
- package/legacy/components/headerFiltering/GridHeaderFilterCell.js +1 -0
- package/legacy/components/headerFiltering/GridHeaderFilterMenu.js +1 -0
- package/legacy/components/headerFiltering/GridHeaderFilterMenuContainer.js +1 -0
- package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +5 -1
- package/legacy/hooks/features/treeData/gridTreeDataUtils.js +9 -5
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/DataGridPro/DataGridPro.js +4 -1
- package/modern/DataGridPro/useDataGridProComponent.js +1 -1
- package/modern/components/headerFiltering/GridHeaderFilterCell.js +1 -0
- package/modern/components/headerFiltering/GridHeaderFilterMenu.js +1 -0
- package/modern/components/headerFiltering/GridHeaderFilterMenuContainer.js +1 -0
- package/modern/hooks/features/columnPinning/useGridColumnPinning.js +5 -1
- package/modern/hooks/features/treeData/gridTreeDataUtils.js +8 -5
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPro/DataGridPro.js +4 -1
- package/node/DataGridPro/useDataGridProComponent.js +1 -1
- package/node/components/headerFiltering/GridHeaderFilterCell.js +1 -0
- package/node/components/headerFiltering/GridHeaderFilterMenu.js +1 -0
- package/node/components/headerFiltering/GridHeaderFilterMenuContainer.js +1 -0
- package/node/hooks/features/columnPinning/useGridColumnPinning.js +5 -1
- package/node/hooks/features/treeData/gridTreeDataUtils.js +8 -5
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,23 +3,151 @@
|
|
|
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
|
+
## 6.9.2
|
|
7
|
+
|
|
8
|
+
_Jul 6, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🚀 Auto-scroll when making range selection (#8661) @m4theushw
|
|
13
|
+
|
|
14
|
+
- 📚 New page: Components lifecycle (#8372) @flaviendelangle
|
|
15
|
+
|
|
16
|
+
Clarify pickers events and value updates in a [single docs page](https://mui.com/x/react-date-pickers/lifecycle/).
|
|
17
|
+
|
|
18
|
+
- 🥧 Add pie chart component
|
|
19
|
+
|
|
20
|
+
They are fresh from the code editor. You can visit [pie charts docs](https://mui.com/x/react-charts/pie/) or their [demo page](https://mui.com/x/react-charts/pie-demo/).
|
|
21
|
+
|
|
22
|
+
<img width="380" alt="pie-charts" src="https://github.com/mui/mui-x/assets/13808724/fe908c45-803c-4316-b913-dbd2f9f0551e">
|
|
23
|
+
|
|
24
|
+
- 🐞 Bugfixes
|
|
25
|
+
|
|
26
|
+
- 📚 Documentation improvements
|
|
27
|
+
|
|
28
|
+
### `@mui/x-data-grid@v6.9.2` / `@mui/x-data-grid-pro@v6.9.2` / `@mui/x-data-grid-premium@v6.9.2`
|
|
29
|
+
|
|
30
|
+
#### Changes
|
|
31
|
+
|
|
32
|
+
- [DataGrid] Fix `RangeError` when using flex columns (#9554) @cherniavskii
|
|
33
|
+
- [DataGrid] Fix React 17 editing bug (#9530) @romgrk
|
|
34
|
+
- [DataGrid] Use `getRowId` in filtering (#9564) @romgrk
|
|
35
|
+
- [DataGrid] Correctly reflect `TablePagination`'s `rowsPerPageOptions` shape to `pageSizeOptions` (#9438) @burakkgunduzz
|
|
36
|
+
- [DataGridPremium] Auto-scroll when making range selection (#8661) @m4theushw
|
|
37
|
+
- [l10n] Improve Spanish (es-ES) locale (#9500) @fufex
|
|
38
|
+
|
|
39
|
+
### `@mui/x-date-pickers@v6.9.2` / `@mui/x-date-pickers-pro@v6.9.2`
|
|
40
|
+
|
|
41
|
+
#### Changes
|
|
42
|
+
|
|
43
|
+
- [pickers] Forward digital clock classes (#9555) @YoonjiJang
|
|
44
|
+
- [pickers] Rename `internal` folder to `internals` on `@mui/x-date-picker-pro` (#9571) @flaviendelangle
|
|
45
|
+
|
|
46
|
+
### `@mui/x-charts@6.0.0-alpha.2`
|
|
47
|
+
|
|
48
|
+
#### Changes
|
|
49
|
+
|
|
50
|
+
- [charts] Add pie chart component (#9395) @alexfauquette
|
|
51
|
+
|
|
52
|
+
### Docs
|
|
53
|
+
|
|
54
|
+
- [docs] Add pickers playground (#9164) @LukasTy
|
|
55
|
+
- [docs] Fix API links for pickers (#9573) @alexfauquette
|
|
56
|
+
- [docs] Fix demos with `ToggleButtonGroup` (#9548) @flaviendelangle
|
|
57
|
+
- [docs] Fix typos in pagination documentation page (#9332) @RatherBeLunar
|
|
58
|
+
- [docs] Hide ads on paid content @oliviertassinari
|
|
59
|
+
- [docs] Move the charts in the sidebar (#9437) @flaviendelangle
|
|
60
|
+
- [docs] New page: Components lifecycle (#8372) @flaviendelangle
|
|
61
|
+
- [docs] Remove outdated header tag @oliviertassinari
|
|
62
|
+
|
|
63
|
+
### Core
|
|
64
|
+
|
|
65
|
+
- [core] Fix typo in priority support @oliviertassinari
|
|
66
|
+
- [core] Remove mention of Crowdin @oliviertassinari
|
|
67
|
+
|
|
68
|
+
## 6.9.1
|
|
69
|
+
|
|
70
|
+
_Jun 30, 2023_
|
|
71
|
+
|
|
72
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
73
|
+
|
|
74
|
+
- 🔎 Add experimental API for faster filtering performance
|
|
75
|
+
- 🌍 Add Chinese (Hong Kong) (zh-HK) locale on the pickers
|
|
76
|
+
- 🌍 Improve Romanian (ro-RO) and Hungarian (hu-HU) translations on the pickers and the data grid
|
|
77
|
+
- 🐞 Bugfixes
|
|
78
|
+
- 📚 Documentation improvements
|
|
79
|
+
|
|
80
|
+
### `@mui/x-data-grid@v6.9.1` / `@mui/x-data-grid-pro@v6.9.1` / `@mui/x-data-grid-premium@v6.9.1`
|
|
81
|
+
|
|
82
|
+
#### Changes
|
|
83
|
+
|
|
84
|
+
- [DataGrid] Add Joy UI `tooltip` and `loadingOverlay` slots (#9028) @cherniavskii
|
|
85
|
+
- [DataGrid] Add section about enabling pagination on Pro and Premium (#8759) @joserodolfofreitas
|
|
86
|
+
- [DataGrid] Don't forward `editCellState` prop to DOM element (#9501) @m4theushw
|
|
87
|
+
- [DataGrid] Add experimental API for faster filtering performance (#9254) @romgrk
|
|
88
|
+
- [DataGrid] Fix `nextFieldToFocus` to always be a visible column field when <kbd>Tab</kbd> key is pressed (#8314) @yaredtsy
|
|
89
|
+
- [DataGrid] Fix `Maximum call stack size exceeded` error when using fractional width (#9516) @cherniavskii
|
|
90
|
+
- [DataGridPro] Don't throw error in column pinning (#9507) @romgrk
|
|
91
|
+
- [DataGridPro] Fix bug with `checkboxSelection` and treeData/grouping (#9418) @romgrk
|
|
92
|
+
- [l10n] Improve Romanian (ro-RO) and Hungarian (hu-HU) translations (#9436) @noraleonte
|
|
93
|
+
|
|
94
|
+
### `@mui/x-date-pickers@v6.9.1` / `@mui/x-date-pickers-pro@v6.9.1`
|
|
95
|
+
|
|
96
|
+
#### Changes
|
|
97
|
+
|
|
98
|
+
- [DateTimePicker] Scroll to Digital Clock section only when selection changes (#9434) @LukasTy
|
|
99
|
+
- [pickers] Handle `keyDown` only when input is focused (#9481) @LukasTy
|
|
100
|
+
- [pickers] Add `referenceDate` prop on `TimeClock`, `DigitalClock` and `MultiSectionDigitalClock` (#9356) @flaviendelangle
|
|
101
|
+
- [l10n] Add Chinese (Hong Kong) (zh-HK) locale (#9468) @samchiu90
|
|
102
|
+
- [l10n] Improve Romanian (ro-RO) translations (#9436) @noraleonte
|
|
103
|
+
|
|
104
|
+
### `@mui/x-charts@6.0.0-alpha.1`
|
|
105
|
+
|
|
106
|
+
#### Changes
|
|
107
|
+
|
|
108
|
+
- [charts] Take responsive container from data grid (#9497) @alexfauquette
|
|
109
|
+
- [charts] Update README.md (#9426) @alexfauquette
|
|
110
|
+
- [charts] Fix typo and small refactor (#9526) @flaviendelangle
|
|
111
|
+
|
|
112
|
+
### Docs
|
|
113
|
+
|
|
114
|
+
- [docs] Add a recipe limiting to one expanded detail panel at a time (#9488) @cherniavskii
|
|
115
|
+
- [docs] Add missing upcoming flag without issue (#9449) @oliviertassinari
|
|
116
|
+
- [docs] Fix 301 when opening the charts @oliviertassinari
|
|
117
|
+
- [docs] Fix 404 link (#9435) @alexfauquette
|
|
118
|
+
- [docs] Fix `productId` logic (#9451) @oliviertassinari
|
|
119
|
+
- [docs] Update charts overview.md (#9429) @brentertz
|
|
120
|
+
- [docs] Avoid systematic usage of `"bg": "inline"` (#9499) @alexfauquette
|
|
121
|
+
- [docs] Display plan icon in ToC (#9490) @cherniavskii
|
|
122
|
+
- [docs] Remove "product" markdown header (#9517) @oliviertassinari
|
|
123
|
+
|
|
124
|
+
### Core
|
|
125
|
+
|
|
126
|
+
- [core] Add `edit-mode` to priority support action (#9483) @DanailH
|
|
127
|
+
- [core] Fix priority support prompt action (#9472) @DanailH
|
|
128
|
+
- [core] Update `uses` for priority support action (#9480) @DanailH
|
|
129
|
+
- [core] Bumb update monorepo (#9476) @alexfauquette
|
|
130
|
+
- [CHANGELOG] Fix media quality (#9439) @oliviertassinari
|
|
131
|
+
- [CHANGELOG] Remove height img attribute @oliviertassinari
|
|
132
|
+
- [test] Skip flaky row pinning tests in JSDOM (#9511) @cherniavskii
|
|
133
|
+
|
|
6
134
|
## 6.9.0
|
|
7
135
|
|
|
8
136
|
_Jun 22, 2023_
|
|
9
137
|
|
|
10
138
|
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
139
|
|
|
12
|
-
- 🎁 We
|
|
13
|
-
|
|
140
|
+
- 🎁 We released a new open-source package: `@mui/x-charts`. This package aims at simplifying the integration of charts into your dashboards. 📊
|
|
141
|
+
|
|
142
|
+
<img width="512" alt="charts" src="https://github.com/mui/mui-x/assets/3165635/41201d3c-16a4-442d-a230-68356e6b433d">
|
|
143
|
+
|
|
144
|
+
It already contains [line](https://mui.com/x/react-charts/lines/), [bar](https://mui.com/x/react-charts/bars/), and [scatter](https://mui.com/x/react-charts/scatter/) charts, with basic customization features. Check out the [documentation](https://mui.com/x/react-charts/) to see what it can do, and open issues to get the feature you need implemented.
|
|
14
145
|
|
|
15
|
-
|
|
146
|
+
- 🚀 Introducing UTC and timezone support for pickers.
|
|
16
147
|
|
|
17
|
-
|
|
18
|
-
Please, visit the new [documentation](https://mui.com/x/react-charts/) to know what it does, and open issues to get the feature you need to be implemented.
|
|
148
|
+
<img width="774" src="https://github.com/mui/mui-x/assets/3165635/ad95a404-ee67-4aff-b996-ad6cbb322348">
|
|
19
149
|
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
Please visit the [documentation](https://mui.com/x/react-date-pickers/timezone/) to learn how to use it.
|
|
150
|
+
Visit the [documentation](https://mui.com/x/react-date-pickers/timezone/) to learn how to use it.
|
|
23
151
|
|
|
24
152
|
- 🌍 Improve Brazilian Portuguese (pt-BR) on the data grid
|
|
25
153
|
- 🌍 Improve Czech (cs-CZ) locale on the pickers
|
|
@@ -677,7 +677,10 @@ DataGridProRaw.propTypes = {
|
|
|
677
677
|
* Select the pageSize dynamically using the component UI.
|
|
678
678
|
* @default [25, 50, 100]
|
|
679
679
|
*/
|
|
680
|
-
pageSizeOptions: PropTypes.arrayOf(PropTypes.number
|
|
680
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
681
|
+
label: PropTypes.string.isRequired,
|
|
682
|
+
value: PropTypes.number.isRequired
|
|
683
|
+
})]).isRequired),
|
|
681
684
|
/**
|
|
682
685
|
* If `true`, pagination is enabled.
|
|
683
686
|
* @default false
|
|
@@ -62,7 +62,7 @@ export const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
62
62
|
useGridRowPinning(apiRef, props);
|
|
63
63
|
useGridColumns(apiRef, props);
|
|
64
64
|
useGridRows(apiRef, props);
|
|
65
|
-
useGridParamsApi(apiRef);
|
|
65
|
+
useGridParamsApi(apiRef, props);
|
|
66
66
|
useGridDetailPanel(apiRef, props);
|
|
67
67
|
useGridColumnSpanning(apiRef);
|
|
68
68
|
useGridColumnGrouping(apiRef, props);
|
package/README.md
CHANGED
|
@@ -205,6 +205,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
205
205
|
colIndex: PropTypes.number.isRequired,
|
|
206
206
|
filterOperators: PropTypes.arrayOf(PropTypes.shape({
|
|
207
207
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
208
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
208
209
|
getValueAsString: PropTypes.func,
|
|
209
210
|
headerLabel: PropTypes.string,
|
|
210
211
|
InputComponent: PropTypes.elementType,
|
|
@@ -77,6 +77,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
77
77
|
open: PropTypes.bool.isRequired,
|
|
78
78
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
79
79
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
80
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
80
81
|
getValueAsString: PropTypes.func,
|
|
81
82
|
headerLabel: PropTypes.string,
|
|
82
83
|
InputComponent: PropTypes.elementType,
|
|
@@ -85,6 +85,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
85
85
|
}).isRequired,
|
|
86
86
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
87
87
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
88
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
88
89
|
getValueAsString: PropTypes.func,
|
|
89
90
|
headerLabel: PropTypes.string,
|
|
90
91
|
InputComponent: PropTypes.elementType,
|
|
@@ -51,8 +51,12 @@ export const useGridColumnPinning = (apiRef, props) => {
|
|
|
51
51
|
if (nbLeftPinnedColumns + nbRightPinnedColumns === 0) {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
+
const rowContainer = apiRef.current.virtualScrollerRef.current;
|
|
55
|
+
if (!rowContainer) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
54
58
|
const index = event.currentTarget.dataset.rowindex;
|
|
55
|
-
const rowElements =
|
|
59
|
+
const rowElements = rowContainer.querySelectorAll(`.${gridClasses.row}[data-rowindex="${index}"]`);
|
|
56
60
|
rowElements.forEach(row => {
|
|
57
61
|
// Ignore rows from other grid inside the hovered row
|
|
58
62
|
if (row.closest(`.${gridClasses.virtualScroller}`) === apiRef.current.virtualScrollerRef.current) {
|
|
@@ -8,6 +8,7 @@ export const TREE_DATA_STRATEGY = 'tree-data';
|
|
|
8
8
|
*/
|
|
9
9
|
export const filterRowTreeFromTreeData = params => {
|
|
10
10
|
const {
|
|
11
|
+
apiRef,
|
|
11
12
|
rowTree,
|
|
12
13
|
disableChildrenFiltering,
|
|
13
14
|
isRowMatchingFilters
|
|
@@ -15,6 +16,10 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
15
16
|
const filteredRowsLookup = {};
|
|
16
17
|
const filteredDescendantCountLookup = {};
|
|
17
18
|
const filterCache = {};
|
|
19
|
+
const filterResults = {
|
|
20
|
+
passingFilterItems: null,
|
|
21
|
+
passingQuickFilterValues: null
|
|
22
|
+
};
|
|
18
23
|
const filterTreeNode = (node, isParentMatchingFilters, areAncestorsExpanded) => {
|
|
19
24
|
const shouldSkipFilters = disableChildrenFiltering && node.depth > 0;
|
|
20
25
|
let isMatchingFilters;
|
|
@@ -23,11 +28,9 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
23
28
|
} else if (!isRowMatchingFilters || node.type === 'footer') {
|
|
24
29
|
isMatchingFilters = true;
|
|
25
30
|
} else {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = isRowMatchingFilters(node.id);
|
|
30
|
-
isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
31
|
+
const row = apiRef.current.getRow(node.id);
|
|
32
|
+
isRowMatchingFilters(row, undefined, filterResults);
|
|
33
|
+
isMatchingFilters = passFilterLogic([filterResults.passingFilterItems], [filterResults.passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
31
34
|
}
|
|
32
35
|
let filteredDescendantCount = 0;
|
|
33
36
|
if (node.type === 'group') {
|
package/index.js
CHANGED
|
@@ -677,7 +677,10 @@ DataGridProRaw.propTypes = {
|
|
|
677
677
|
* Select the pageSize dynamically using the component UI.
|
|
678
678
|
* @default [25, 50, 100]
|
|
679
679
|
*/
|
|
680
|
-
pageSizeOptions: PropTypes.arrayOf(PropTypes.number
|
|
680
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
681
|
+
label: PropTypes.string.isRequired,
|
|
682
|
+
value: PropTypes.number.isRequired
|
|
683
|
+
})]).isRequired),
|
|
681
684
|
/**
|
|
682
685
|
* If `true`, pagination is enabled.
|
|
683
686
|
* @default false
|
|
@@ -62,7 +62,7 @@ export var useDataGridProComponent = function useDataGridProComponent(inputApiRe
|
|
|
62
62
|
useGridRowPinning(apiRef, props);
|
|
63
63
|
useGridColumns(apiRef, props);
|
|
64
64
|
useGridRows(apiRef, props);
|
|
65
|
-
useGridParamsApi(apiRef);
|
|
65
|
+
useGridParamsApi(apiRef, props);
|
|
66
66
|
useGridDetailPanel(apiRef, props);
|
|
67
67
|
useGridColumnSpanning(apiRef);
|
|
68
68
|
useGridColumnGrouping(apiRef, props);
|
|
@@ -210,6 +210,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
210
210
|
colIndex: PropTypes.number.isRequired,
|
|
211
211
|
filterOperators: PropTypes.arrayOf(PropTypes.shape({
|
|
212
212
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
213
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
213
214
|
getValueAsString: PropTypes.func,
|
|
214
215
|
headerLabel: PropTypes.string,
|
|
215
216
|
InputComponent: PropTypes.elementType,
|
|
@@ -76,6 +76,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
76
76
|
open: PropTypes.bool.isRequired,
|
|
77
77
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
78
78
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
79
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
79
80
|
getValueAsString: PropTypes.func,
|
|
80
81
|
headerLabel: PropTypes.string,
|
|
81
82
|
InputComponent: PropTypes.elementType,
|
|
@@ -83,6 +83,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
83
83
|
}).isRequired,
|
|
84
84
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
85
85
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
86
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
86
87
|
getValueAsString: PropTypes.func,
|
|
87
88
|
headerLabel: PropTypes.string,
|
|
88
89
|
InputComponent: PropTypes.elementType,
|
|
@@ -58,8 +58,12 @@ export var useGridColumnPinning = function useGridColumnPinning(apiRef, props) {
|
|
|
58
58
|
if (nbLeftPinnedColumns + nbRightPinnedColumns === 0) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
+
var rowContainer = apiRef.current.virtualScrollerRef.current;
|
|
62
|
+
if (!rowContainer) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
61
65
|
var index = event.currentTarget.dataset.rowindex;
|
|
62
|
-
var rowElements =
|
|
66
|
+
var rowElements = rowContainer.querySelectorAll(".".concat(gridClasses.row, "[data-rowindex=\"").concat(index, "\"]"));
|
|
63
67
|
rowElements.forEach(function (row) {
|
|
64
68
|
// Ignore rows from other grid inside the hovered row
|
|
65
69
|
if (row.closest(".".concat(gridClasses.virtualScroller)) === apiRef.current.virtualScrollerRef.current) {
|
|
@@ -7,12 +7,17 @@ export var TREE_DATA_STRATEGY = 'tree-data';
|
|
|
7
7
|
* - It is passing the filter
|
|
8
8
|
*/
|
|
9
9
|
export var filterRowTreeFromTreeData = function filterRowTreeFromTreeData(params) {
|
|
10
|
-
var
|
|
10
|
+
var apiRef = params.apiRef,
|
|
11
|
+
rowTree = params.rowTree,
|
|
11
12
|
disableChildrenFiltering = params.disableChildrenFiltering,
|
|
12
13
|
isRowMatchingFilters = params.isRowMatchingFilters;
|
|
13
14
|
var filteredRowsLookup = {};
|
|
14
15
|
var filteredDescendantCountLookup = {};
|
|
15
16
|
var filterCache = {};
|
|
17
|
+
var filterResults = {
|
|
18
|
+
passingFilterItems: null,
|
|
19
|
+
passingQuickFilterValues: null
|
|
20
|
+
};
|
|
16
21
|
var filterTreeNode = function filterTreeNode(node, isParentMatchingFilters, areAncestorsExpanded) {
|
|
17
22
|
var shouldSkipFilters = disableChildrenFiltering && node.depth > 0;
|
|
18
23
|
var isMatchingFilters;
|
|
@@ -21,10 +26,9 @@ export var filterRowTreeFromTreeData = function filterRowTreeFromTreeData(params
|
|
|
21
26
|
} else if (!isRowMatchingFilters || node.type === 'footer') {
|
|
22
27
|
isMatchingFilters = true;
|
|
23
28
|
} else {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
29
|
+
var row = apiRef.current.getRow(node.id);
|
|
30
|
+
isRowMatchingFilters(row, undefined, filterResults);
|
|
31
|
+
isMatchingFilters = passFilterLogic([filterResults.passingFilterItems], [filterResults.passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
28
32
|
}
|
|
29
33
|
var filteredDescendantCount = 0;
|
|
30
34
|
if (node.type === 'group') {
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY4ODU5MDgwMDAwMA==";
|
|
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
|
|
@@ -677,7 +677,10 @@ DataGridProRaw.propTypes = {
|
|
|
677
677
|
* Select the pageSize dynamically using the component UI.
|
|
678
678
|
* @default [25, 50, 100]
|
|
679
679
|
*/
|
|
680
|
-
pageSizeOptions: PropTypes.arrayOf(PropTypes.number
|
|
680
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
681
|
+
label: PropTypes.string.isRequired,
|
|
682
|
+
value: PropTypes.number.isRequired
|
|
683
|
+
})]).isRequired),
|
|
681
684
|
/**
|
|
682
685
|
* If `true`, pagination is enabled.
|
|
683
686
|
* @default false
|
|
@@ -62,7 +62,7 @@ export const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
62
62
|
useGridRowPinning(apiRef, props);
|
|
63
63
|
useGridColumns(apiRef, props);
|
|
64
64
|
useGridRows(apiRef, props);
|
|
65
|
-
useGridParamsApi(apiRef);
|
|
65
|
+
useGridParamsApi(apiRef, props);
|
|
66
66
|
useGridDetailPanel(apiRef, props);
|
|
67
67
|
useGridColumnSpanning(apiRef);
|
|
68
68
|
useGridColumnGrouping(apiRef, props);
|
|
@@ -203,6 +203,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
203
203
|
colIndex: PropTypes.number.isRequired,
|
|
204
204
|
filterOperators: PropTypes.arrayOf(PropTypes.shape({
|
|
205
205
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
206
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
206
207
|
getValueAsString: PropTypes.func,
|
|
207
208
|
headerLabel: PropTypes.string,
|
|
208
209
|
InputComponent: PropTypes.elementType,
|
|
@@ -76,6 +76,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
76
76
|
open: PropTypes.bool.isRequired,
|
|
77
77
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
78
78
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
79
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
79
80
|
getValueAsString: PropTypes.func,
|
|
80
81
|
headerLabel: PropTypes.string,
|
|
81
82
|
InputComponent: PropTypes.elementType,
|
|
@@ -84,6 +84,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
84
84
|
}).isRequired,
|
|
85
85
|
operators: PropTypes.arrayOf(PropTypes.shape({
|
|
86
86
|
getApplyFilterFn: PropTypes.func.isRequired,
|
|
87
|
+
getApplyFilterFnV7: PropTypes.func,
|
|
87
88
|
getValueAsString: PropTypes.func,
|
|
88
89
|
headerLabel: PropTypes.string,
|
|
89
90
|
InputComponent: PropTypes.elementType,
|
|
@@ -47,8 +47,12 @@ export const useGridColumnPinning = (apiRef, props) => {
|
|
|
47
47
|
if (nbLeftPinnedColumns + nbRightPinnedColumns === 0) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
+
const rowContainer = apiRef.current.virtualScrollerRef.current;
|
|
51
|
+
if (!rowContainer) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
50
54
|
const index = event.currentTarget.dataset.rowindex;
|
|
51
|
-
const rowElements =
|
|
55
|
+
const rowElements = rowContainer.querySelectorAll(`.${gridClasses.row}[data-rowindex="${index}"]`);
|
|
52
56
|
rowElements.forEach(row => {
|
|
53
57
|
// Ignore rows from other grid inside the hovered row
|
|
54
58
|
if (row.closest(`.${gridClasses.virtualScroller}`) === apiRef.current.virtualScrollerRef.current) {
|
|
@@ -8,6 +8,7 @@ export const TREE_DATA_STRATEGY = 'tree-data';
|
|
|
8
8
|
*/
|
|
9
9
|
export const filterRowTreeFromTreeData = params => {
|
|
10
10
|
const {
|
|
11
|
+
apiRef,
|
|
11
12
|
rowTree,
|
|
12
13
|
disableChildrenFiltering,
|
|
13
14
|
isRowMatchingFilters
|
|
@@ -15,6 +16,10 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
15
16
|
const filteredRowsLookup = {};
|
|
16
17
|
const filteredDescendantCountLookup = {};
|
|
17
18
|
const filterCache = {};
|
|
19
|
+
const filterResults = {
|
|
20
|
+
passingFilterItems: null,
|
|
21
|
+
passingQuickFilterValues: null
|
|
22
|
+
};
|
|
18
23
|
const filterTreeNode = (node, isParentMatchingFilters, areAncestorsExpanded) => {
|
|
19
24
|
const shouldSkipFilters = disableChildrenFiltering && node.depth > 0;
|
|
20
25
|
let isMatchingFilters;
|
|
@@ -23,11 +28,9 @@ export const filterRowTreeFromTreeData = params => {
|
|
|
23
28
|
} else if (!isRowMatchingFilters || node.type === 'footer') {
|
|
24
29
|
isMatchingFilters = true;
|
|
25
30
|
} else {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = isRowMatchingFilters(node.id);
|
|
30
|
-
isMatchingFilters = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
31
|
+
const row = apiRef.current.getRow(node.id);
|
|
32
|
+
isRowMatchingFilters(row, undefined, filterResults);
|
|
33
|
+
isMatchingFilters = passFilterLogic([filterResults.passingFilterItems], [filterResults.passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
31
34
|
}
|
|
32
35
|
let filteredDescendantCount = 0;
|
|
33
36
|
if (node.type === 'group') {
|
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 = "MTY4ODU5MDgwMDAwMA==";
|
|
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
|
|
@@ -686,7 +686,10 @@ DataGridProRaw.propTypes = {
|
|
|
686
686
|
* Select the pageSize dynamically using the component UI.
|
|
687
687
|
* @default [25, 50, 100]
|
|
688
688
|
*/
|
|
689
|
-
pageSizeOptions: _propTypes.default.arrayOf(_propTypes.default.number
|
|
689
|
+
pageSizeOptions: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
690
|
+
label: _propTypes.default.string.isRequired,
|
|
691
|
+
value: _propTypes.default.number.isRequired
|
|
692
|
+
})]).isRequired),
|
|
690
693
|
/**
|
|
691
694
|
* If `true`, pagination is enabled.
|
|
692
695
|
* @default false
|
|
@@ -69,7 +69,7 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
69
69
|
(0, _useGridRowPinning.useGridRowPinning)(apiRef, props);
|
|
70
70
|
(0, _internals.useGridColumns)(apiRef, props);
|
|
71
71
|
(0, _internals.useGridRows)(apiRef, props);
|
|
72
|
-
(0, _internals.useGridParamsApi)(apiRef);
|
|
72
|
+
(0, _internals.useGridParamsApi)(apiRef, props);
|
|
73
73
|
(0, _useGridDetailPanel.useGridDetailPanel)(apiRef, props);
|
|
74
74
|
(0, _internals.useGridColumnSpanning)(apiRef);
|
|
75
75
|
(0, _internals.useGridColumnGrouping)(apiRef, props);
|
|
@@ -212,6 +212,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
212
212
|
colIndex: _propTypes.default.number.isRequired,
|
|
213
213
|
filterOperators: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
214
214
|
getApplyFilterFn: _propTypes.default.func.isRequired,
|
|
215
|
+
getApplyFilterFnV7: _propTypes.default.func,
|
|
215
216
|
getValueAsString: _propTypes.default.func,
|
|
216
217
|
headerLabel: _propTypes.default.string,
|
|
217
218
|
InputComponent: _propTypes.default.elementType,
|
|
@@ -85,6 +85,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
85
85
|
open: _propTypes.default.bool.isRequired,
|
|
86
86
|
operators: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
87
87
|
getApplyFilterFn: _propTypes.default.func.isRequired,
|
|
88
|
+
getApplyFilterFnV7: _propTypes.default.func,
|
|
88
89
|
getValueAsString: _propTypes.default.func,
|
|
89
90
|
headerLabel: _propTypes.default.string,
|
|
90
91
|
InputComponent: _propTypes.default.elementType,
|
|
@@ -92,6 +92,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
92
92
|
}).isRequired,
|
|
93
93
|
operators: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
94
94
|
getApplyFilterFn: _propTypes.default.func.isRequired,
|
|
95
|
+
getApplyFilterFnV7: _propTypes.default.func,
|
|
95
96
|
getValueAsString: _propTypes.default.func,
|
|
96
97
|
headerLabel: _propTypes.default.string,
|
|
97
98
|
InputComponent: _propTypes.default.elementType,
|
|
@@ -57,8 +57,12 @@ const useGridColumnPinning = (apiRef, props) => {
|
|
|
57
57
|
if (nbLeftPinnedColumns + nbRightPinnedColumns === 0) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
+
const rowContainer = apiRef.current.virtualScrollerRef.current;
|
|
61
|
+
if (!rowContainer) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
60
64
|
const index = event.currentTarget.dataset.rowindex;
|
|
61
|
-
const rowElements =
|
|
65
|
+
const rowElements = rowContainer.querySelectorAll(`.${_xDataGrid.gridClasses.row}[data-rowindex="${index}"]`);
|
|
62
66
|
rowElements.forEach(row => {
|
|
63
67
|
// Ignore rows from other grid inside the hovered row
|
|
64
68
|
if (row.closest(`.${_xDataGrid.gridClasses.virtualScroller}`) === apiRef.current.virtualScrollerRef.current) {
|
|
@@ -15,6 +15,7 @@ const TREE_DATA_STRATEGY = 'tree-data';
|
|
|
15
15
|
exports.TREE_DATA_STRATEGY = TREE_DATA_STRATEGY;
|
|
16
16
|
const filterRowTreeFromTreeData = params => {
|
|
17
17
|
const {
|
|
18
|
+
apiRef,
|
|
18
19
|
rowTree,
|
|
19
20
|
disableChildrenFiltering,
|
|
20
21
|
isRowMatchingFilters
|
|
@@ -22,6 +23,10 @@ const filterRowTreeFromTreeData = params => {
|
|
|
22
23
|
const filteredRowsLookup = {};
|
|
23
24
|
const filteredDescendantCountLookup = {};
|
|
24
25
|
const filterCache = {};
|
|
26
|
+
const filterResults = {
|
|
27
|
+
passingFilterItems: null,
|
|
28
|
+
passingQuickFilterValues: null
|
|
29
|
+
};
|
|
25
30
|
const filterTreeNode = (node, isParentMatchingFilters, areAncestorsExpanded) => {
|
|
26
31
|
const shouldSkipFilters = disableChildrenFiltering && node.depth > 0;
|
|
27
32
|
let isMatchingFilters;
|
|
@@ -30,11 +35,9 @@ const filterRowTreeFromTreeData = params => {
|
|
|
30
35
|
} else if (!isRowMatchingFilters || node.type === 'footer') {
|
|
31
36
|
isMatchingFilters = true;
|
|
32
37
|
} else {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = isRowMatchingFilters(node.id);
|
|
37
|
-
isMatchingFilters = (0, _internals.passFilterLogic)([passingFilterItems], [passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
38
|
+
const row = apiRef.current.getRow(node.id);
|
|
39
|
+
isRowMatchingFilters(row, undefined, filterResults);
|
|
40
|
+
isMatchingFilters = (0, _internals.passFilterLogic)([filterResults.passingFilterItems], [filterResults.passingQuickFilterValues], params.filterModel, params.apiRef, filterCache);
|
|
38
41
|
}
|
|
39
42
|
let filteredDescendantCount = 0;
|
|
40
43
|
if (node.type === 'group') {
|
package/node/index.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 = "MTY4ODU5MDgwMDAwMA==";
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.2",
|
|
4
4
|
"description": "The Pro plan edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.22.5",
|
|
35
|
-
"@mui/utils": "^5.13.
|
|
36
|
-
"@mui/x-data-grid": "6.9.
|
|
35
|
+
"@mui/utils": "^5.13.6",
|
|
36
|
+
"@mui/x-data-grid": "6.9.2",
|
|
37
37
|
"@mui/x-license-pro": "6.9.0",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
package/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 = "MTY4ODU5MDgwMDAwMA==";
|
|
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
|