@mui/x-data-grid 8.11.3 → 8.12.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 +151 -6
- package/DataGrid/DataGrid.js +3 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/colDef/gridActionsColDef.js +1 -0
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridStringColDef.js +1 -0
- package/components/cell/GridCell.js +7 -5
- package/constants/localeTextConstants.js +29 -0
- package/esm/DataGrid/DataGrid.js +3 -1
- package/esm/DataGrid/useDataGridComponent.js +2 -2
- package/esm/colDef/gridActionsColDef.js +1 -0
- package/esm/colDef/gridBooleanColDef.js +1 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/colDef/gridStringColDef.js +1 -0
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/constants/localeTextConstants.js +29 -0
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +21 -4
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +12 -4
- package/esm/hooks/features/filter/gridFilterSelector.js +21 -4
- package/esm/hooks/features/filter/gridFilterState.d.ts +3 -1
- package/esm/hooks/features/filter/gridFilterUtils.d.ts +3 -3
- package/esm/hooks/features/filter/gridFilterUtils.js +23 -13
- package/esm/hooks/features/filter/useGridFilter.d.ts +2 -1
- package/esm/hooks/features/filter/useGridFilter.js +7 -5
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +3 -0
- package/esm/hooks/features/rows/gridRowsSelector.js +4 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +16 -7
- package/esm/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
- package/esm/hooks/features/sorting/gridSortingUtils.js +10 -4
- package/esm/hooks/features/sorting/useGridSorting.d.ts +2 -1
- package/esm/hooks/features/sorting/useGridSorting.js +4 -3
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/locales/arSD.js +31 -0
- package/esm/locales/beBY.js +31 -0
- package/esm/locales/bgBG.js +31 -0
- package/esm/locales/bnBD.js +31 -0
- package/esm/locales/csCZ.js +31 -0
- package/esm/locales/daDK.js +31 -0
- package/esm/locales/deDE.js +32 -0
- package/esm/locales/elGR.js +31 -0
- package/esm/locales/esES.js +31 -0
- package/esm/locales/faIR.js +31 -0
- package/esm/locales/fiFI.js +31 -0
- package/esm/locales/frFR.js +32 -2
- package/esm/locales/heIL.js +31 -0
- package/esm/locales/hrHR.js +31 -0
- package/esm/locales/huHU.js +31 -0
- package/esm/locales/hyAM.js +31 -0
- package/esm/locales/idID.d.ts +1 -1
- package/esm/locales/idID.js +32 -0
- package/esm/locales/isIS.js +31 -0
- package/esm/locales/itIT.js +31 -0
- package/esm/locales/jaJP.js +31 -0
- package/esm/locales/koKR.js +31 -0
- package/esm/locales/nbNO.js +31 -0
- package/esm/locales/nlNL.js +31 -0
- package/esm/locales/nnNO.js +32 -0
- package/esm/locales/plPL.js +31 -0
- package/esm/locales/ptBR.js +31 -0
- package/esm/locales/ptPT.js +31 -0
- package/esm/locales/roRO.js +31 -0
- package/esm/locales/ruRU.js +31 -0
- package/esm/locales/skSK.js +31 -0
- package/esm/locales/svSE.js +31 -0
- package/esm/locales/trTR.js +31 -0
- package/esm/locales/ukUA.js +31 -0
- package/esm/locales/urPK.js +31 -0
- package/esm/locales/viVN.js +31 -0
- package/esm/locales/zhCN.js +31 -0
- package/esm/locales/zhHK.js +31 -0
- package/esm/locales/zhTW.js +31 -0
- package/esm/material/augmentation.d.ts +8 -0
- package/esm/material/index.js +122 -24
- package/esm/models/api/gridLocaleTextApi.d.ts +27 -0
- package/esm/models/api/gridParamsApi.d.ts +5 -1
- package/esm/models/configuration/gridAggregationConfiguration.d.ts +25 -0
- package/esm/models/configuration/gridAggregationConfiguration.js +1 -0
- package/esm/models/configuration/gridConfiguration.d.ts +6 -9
- package/esm/models/gridBaseSlots.d.ts +15 -0
- package/esm/models/gridSlotsComponent.d.ts +10 -0
- package/esm/models/gridSlotsComponentsProps.d.ts +5 -1
- package/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/hooks/features/columns/useGridColumns.js +23 -6
- package/hooks/features/filter/gridFilterSelector.d.ts +12 -4
- package/hooks/features/filter/gridFilterSelector.js +22 -5
- package/hooks/features/filter/gridFilterState.d.ts +3 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +3 -3
- package/hooks/features/filter/gridFilterUtils.js +23 -13
- package/hooks/features/filter/useGridFilter.d.ts +2 -1
- package/hooks/features/filter/useGridFilter.js +7 -5
- package/hooks/features/rows/gridRowsSelector.d.ts +3 -0
- package/hooks/features/rows/gridRowsSelector.js +4 -0
- package/hooks/features/rows/useGridParamsApi.js +16 -7
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
- package/hooks/features/sorting/gridSortingUtils.js +10 -4
- package/hooks/features/sorting/useGridSorting.d.ts +2 -1
- package/hooks/features/sorting/useGridSorting.js +4 -3
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +7 -0
- package/locales/arSD.js +31 -0
- package/locales/beBY.js +31 -0
- package/locales/bgBG.js +31 -0
- package/locales/bnBD.js +31 -0
- package/locales/csCZ.js +31 -0
- package/locales/daDK.js +31 -0
- package/locales/deDE.js +32 -0
- package/locales/elGR.js +31 -0
- package/locales/esES.js +31 -0
- package/locales/faIR.js +31 -0
- package/locales/fiFI.js +31 -0
- package/locales/frFR.js +32 -2
- package/locales/heIL.js +31 -0
- package/locales/hrHR.js +31 -0
- package/locales/huHU.js +31 -0
- package/locales/hyAM.js +31 -0
- package/locales/idID.d.ts +1 -1
- package/locales/idID.js +32 -0
- package/locales/isIS.js +31 -0
- package/locales/itIT.js +31 -0
- package/locales/jaJP.js +31 -0
- package/locales/koKR.js +31 -0
- package/locales/nbNO.js +31 -0
- package/locales/nlNL.js +31 -0
- package/locales/nnNO.js +32 -0
- package/locales/plPL.js +31 -0
- package/locales/ptBR.js +31 -0
- package/locales/ptPT.js +31 -0
- package/locales/roRO.js +31 -0
- package/locales/ruRU.js +31 -0
- package/locales/skSK.js +31 -0
- package/locales/svSE.js +31 -0
- package/locales/trTR.js +31 -0
- package/locales/ukUA.js +31 -0
- package/locales/urPK.js +31 -0
- package/locales/viVN.js +31 -0
- package/locales/zhCN.js +31 -0
- package/locales/zhHK.js +31 -0
- package/locales/zhTW.js +31 -0
- package/material/augmentation.d.ts +8 -0
- package/material/index.js +122 -24
- package/models/api/gridLocaleTextApi.d.ts +27 -0
- package/models/api/gridParamsApi.d.ts +5 -1
- package/models/configuration/gridAggregationConfiguration.d.ts +25 -0
- package/models/configuration/gridAggregationConfiguration.js +5 -0
- package/models/configuration/gridConfiguration.d.ts +6 -9
- package/models/gridBaseSlots.d.ts +15 -0
- package/models/gridSlotsComponent.d.ts +10 -0
- package/models/gridSlotsComponentsProps.d.ts +5 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,151 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.12.0
|
|
9
|
+
|
|
10
|
+
_Sep 25, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🤝 Grid-Charts integration
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
👉 [🎥 Watch the full video](https://github.com/user-attachments/assets/28f1848e-dc85-4077-8756-a3e88afd4e54)
|
|
19
|
+
|
|
20
|
+
- ⌨️ Charts keyboard navigation
|
|
21
|
+
- ⚡️ Charts: Add new `renderer="svg-batch"` prop to Scatter charts that provides improved performance for large datasets
|
|
22
|
+
- 🐞 Bugfixes
|
|
23
|
+
- 📚 Documentation improvements
|
|
24
|
+
- 🧰 Codemod requires Node >=20.19
|
|
25
|
+
|
|
26
|
+
`@mui/x-codemod` minimum supported Node version is `20.19`.
|
|
27
|
+
This was only the case due to using the v18 `yargs` package; this now explicitly aligns with it. (#18979)
|
|
28
|
+
|
|
29
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
30
|
+
@deade1e, @sai6855, @thomas-mcdonald
|
|
31
|
+
|
|
32
|
+
The following are all team members who have contributed to this release:
|
|
33
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @michelengelen, @prakhargupta1, @rita-codes, @siriwatknp, @arminmeh, @romgrk
|
|
34
|
+
|
|
35
|
+
### Data Grid
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-data-grid@8.12.0`
|
|
38
|
+
|
|
39
|
+
- [DataGrid] Fix flex column width diff calculation while resizing (#19667) @arminmeh
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid@8.12.0`.
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid-premium@8.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid-pro@8.12.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPremium] Grid-Charts integration (#18021) @arminmeh
|
|
50
|
+
- [DataGridPremium] Fix sorting and filtering of the tree group columns with aggregation (#19607) @arminmeh
|
|
51
|
+
- [DataGridPremium] Disable aggregation on the grouping column by default (#19692) @arminmeh
|
|
52
|
+
- [DataGridPremium] Do not rely on the group separation constant to retrieve the column name for the charts panel (#19677) @arminmeh
|
|
53
|
+
- [DataGridPremium] Fix stale aggregation state (#19690) @arminmeh
|
|
54
|
+
- [DataGridPremium] Fix pivot column being hidden on autosizing (#19699) @cherniavskii
|
|
55
|
+
|
|
56
|
+
### Date and Time Pickers
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers@8.12.0`
|
|
59
|
+
|
|
60
|
+
- [pickers] Ensure reference value is not updated for invalid values (#19635) @michelengelen
|
|
61
|
+
- [pickers] Fix `slotProps.textField.slotProps.htmlInput` resolution (#19713) @LukasTy
|
|
62
|
+
- [pickers] Preserve time format when using single column layout on Time Range Picker (#19626) @sai6855
|
|
63
|
+
- [pickers] Preserve time format when using single column layout on Date Time Picker and Date Time Range Picker (#19608) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-date-pickers-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-date-pickers@8.12.0`.
|
|
68
|
+
|
|
69
|
+
### Charts
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts@8.12.0`
|
|
72
|
+
|
|
73
|
+
- [charts] Add batch renderer for scatter chart (#19075) @bernardobelchior
|
|
74
|
+
- [charts] Add renderer suffix to performance benchmarks (#19620) @bernardobelchior
|
|
75
|
+
- [charts] Document how plugins can be used (#19343) @alexfauquette
|
|
76
|
+
- [charts] Export chart plugins per series type (#19337) @alexfauquette
|
|
77
|
+
- [charts] Export plugins (#19335) @alexfauquette
|
|
78
|
+
- [charts] Fix horizontal layout and toolbar (#19655) @alexfauquette
|
|
79
|
+
- [charts] Fix performance issue with JS animations (#19606) @bernardobelchior
|
|
80
|
+
- [charts] Fix piecewise scale causing wrong colors in axis with min/max (#19610) @bernardobelchior
|
|
81
|
+
- [charts] Fix zoom discard inconsistency (#19535) @bernardobelchior
|
|
82
|
+
- [charts] Introduce keyboard navigation (#19155) @alexfauquette
|
|
83
|
+
- [charts] Refactor `getAxisExtremum` (#19627) @bernardobelchior
|
|
84
|
+
- [charts] Remove unused code path from `getAxisScale` (#19673) @bernardobelchior
|
|
85
|
+
- [charts] Make new hideLegend prop on ChartWrapper optional (#19694) @thomas-mcdonald
|
|
86
|
+
- [charts] Fix chart crash in test environment (#19711) @JCQuintas
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-charts@8.12.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [charts-pro] Add `valueFormatter` to sankey (#19636) @JCQuintas
|
|
93
|
+
- [charts-pro] Allow `source/target` keywords in sankey link color (#19634) @JCQuintas
|
|
94
|
+
- [charts-pro] Allow exporting `SankeyChart` (#19659) @JCQuintas
|
|
95
|
+
- [charts-pro] Fix axis inversion when using axis `max` and `filterMode: 'discard'` (#19200) @bernardobelchior
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-charts-premium@8.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-charts-pro@8.12.0`, plus:
|
|
100
|
+
|
|
101
|
+
- [charts-premium] Grid-Charts integration (#18021) @arminmeh
|
|
102
|
+
|
|
103
|
+
### Tree View
|
|
104
|
+
|
|
105
|
+
#### `@mui/x-tree-view@8.12.0`
|
|
106
|
+
|
|
107
|
+
- [tree view] Allow to pass `null` to the icon slots (#19569) @flaviendelangle
|
|
108
|
+
- [tree view] Fix `apiRef.current.isItemExpanded()` method (#19619) @flaviendelangle
|
|
109
|
+
|
|
110
|
+
#### `@mui/x-tree-view-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
111
|
+
|
|
112
|
+
Same changes as in `@mui/x-tree-view@8.12.0`.
|
|
113
|
+
|
|
114
|
+
### Codemod
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-codemod@8.12.0`
|
|
117
|
+
|
|
118
|
+
- [codemod] Bump `engines.node` to `>=20.19` to align with `yargs` package (#18979) @LukasTy
|
|
119
|
+
|
|
120
|
+
### Docs
|
|
121
|
+
|
|
122
|
+
- [docs] Add missing label to Charts example (#19616) @prakhargupta1
|
|
123
|
+
- [docs] Replace axis type and axis data with a table (#19618) @prakhargupta1
|
|
124
|
+
- [docs] Add Charts example collection page (#18353) @prakhargupta1
|
|
125
|
+
- [docs] Add a Charts demo showcasing bar and scatter composition (#19605) @prakhargupta1
|
|
126
|
+
- [docs] Add composition Charts demo for legends and tooltip (#19602) @prakhargupta1
|
|
127
|
+
- [docs] Add recipe about server-side data export (#19617) @siriwatknp
|
|
128
|
+
- [docs] Clarify DataGrid layout requirements (#19413) @romgrk
|
|
129
|
+
- [docs] Fix `ExportServerSideData` demo layout shift (#19669) @siriwatknp
|
|
130
|
+
- [docs] Improve server-side `updateRow()` description (#19554) @deade1e
|
|
131
|
+
- [docs] Show how to customize drawing area background (#19682) @alexfauquette
|
|
132
|
+
- [docs] Add hook documentation pages (#19334) @Copilot
|
|
133
|
+
|
|
134
|
+
### Core
|
|
135
|
+
|
|
136
|
+
- [code-infra] Add copilot instructions specific to x repo (#19623) @JCQuintas
|
|
137
|
+
- [code-infra] Load `tsx` files in visual regression (#19595) @JCQuintas
|
|
138
|
+
- [code-infra] Remove renovate automerge (#19501) @Janpot
|
|
139
|
+
- [code-infra] Update `DEFAULT_TIMESTAMP` format to ISO 8601 (#19624) @Janpot
|
|
140
|
+
- [code-infra] Update `findLatestTaggedVersion` to filter tags based on major version (#19693) @michelengelen
|
|
141
|
+
- [code-infra] Fix changelog generation for charts premium (#19701) @JCQuintas
|
|
142
|
+
- [code-infra] Run prettier on `createReleasePR.mjs` (#19702) @bernardobelchior
|
|
143
|
+
- [code-infra] Make `x-charts-premium` releasable (#18959) @JCQuintas
|
|
144
|
+
- [docs-infra] Ensure `create-playground` script only runs if target file is absent (#19603) @michelengelen
|
|
145
|
+
- [docs-infra] Add @prakhargupta1 as a codeowner of the docs (#19679) @alexfauquette
|
|
146
|
+
|
|
147
|
+
### Miscellaneous
|
|
148
|
+
|
|
149
|
+
- [test] Reduce time for wheel zoom test (#19571) @alexfauquette
|
|
150
|
+
- Change `matchPackageNames` to `matchDepNames` for date-fns-v2 @Janpot
|
|
151
|
+
- Remove groupName for date-fns-v2 in renovate.json @Janpot
|
|
152
|
+
|
|
8
153
|
## 8.11.3
|
|
9
154
|
|
|
10
155
|
_Sep 16, 2025_
|
|
@@ -27,11 +172,11 @@ The following are all team members who have contributed to this release:
|
|
|
27
172
|
- [DataGrid] Fix numeric font size not being applied (#19552) @cherniavskii
|
|
28
173
|
- [DataGrid] Improve `operator` types to display literal values (#19529) @siriwatknp
|
|
29
174
|
|
|
30
|
-
#### `@mui/x-data-grid-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
175
|
+
#### `@mui/x-data-grid-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
176
|
|
|
32
177
|
Same changes as in `@mui/x-data-grid@8.11.3`.
|
|
33
178
|
|
|
34
|
-
#### `@mui/x-data-grid-premium@8.11.3` [](https://mui.com/r/x-premium-svg-link
|
|
179
|
+
#### `@mui/x-data-grid-premium@8.11.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
35
180
|
|
|
36
181
|
Same changes as in `@mui/x-data-grid-pro@8.11.3`.
|
|
37
182
|
|
|
@@ -41,7 +186,7 @@ Same changes as in `@mui/x-data-grid-pro@8.11.3`.
|
|
|
41
186
|
|
|
42
187
|
- [pickers] Refactor `slots` and `slotProps` propagation strategy (#18867) @LukasTy
|
|
43
188
|
|
|
44
|
-
#### `@mui/x-date-pickers-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
189
|
+
#### `@mui/x-date-pickers-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
45
190
|
|
|
46
191
|
Same changes as in `@mui/x-date-pickers@8.11.3`.
|
|
47
192
|
|
|
@@ -55,7 +200,7 @@ Same changes as in `@mui/x-date-pickers@8.11.3`.
|
|
|
55
200
|
- [charts] Rename `isBandScale` to `isDiscreteScale` (#19514) @bernardobelchior
|
|
56
201
|
- [charts] Fix legend position affecting toolbar's position (#19257) @sai6855
|
|
57
202
|
|
|
58
|
-
#### `@mui/x-charts-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
203
|
+
#### `@mui/x-charts-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
204
|
|
|
60
205
|
Same changes as in `@mui/x-charts@8.11.3`, plus:
|
|
61
206
|
|
|
@@ -69,7 +214,7 @@ Same changes as in `@mui/x-charts@8.11.3`, plus:
|
|
|
69
214
|
- [tree view] Support flat DOM structure (#19350) @flaviendelangle
|
|
70
215
|
- [tree view] Update cursor styles for disabled TreeItem (#19548) @sai6855
|
|
71
216
|
|
|
72
|
-
#### `@mui/x-tree-view-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
217
|
+
#### `@mui/x-tree-view-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
218
|
|
|
74
219
|
Same changes as in `@mui/x-tree-view@8.11.3`.
|
|
75
220
|
|
|
@@ -83,7 +228,7 @@ Internal changes.
|
|
|
83
228
|
|
|
84
229
|
- [docs] Add styling row group recipe (#19349) @siriwatknp
|
|
85
230
|
- [docs] Group demos data into the dataset folder (#19549) @alexfauquette
|
|
86
|
-
- [docs] Add `shiny` bar chart example at the top
|
|
231
|
+
- [docs] Add `shiny` bar chart example at the top (#19416) @JCQuintas
|
|
87
232
|
|
|
88
233
|
### Core
|
|
89
234
|
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -28,7 +28,9 @@ const configuration = {
|
|
|
28
28
|
useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributes,
|
|
29
29
|
useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes,
|
|
30
30
|
useGridRowsOverridableMethods: _useGridRowsOverridableMethods.useGridRowsOverridableMethods,
|
|
31
|
-
useCellAggregationResult: () => null
|
|
31
|
+
useCellAggregationResult: () => null,
|
|
32
|
+
useSortValueGetter: apiRef => apiRef.current.getCellValue,
|
|
33
|
+
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
@@ -84,8 +84,8 @@ const useDataGridComponent = (apiRef, props, configuration) => {
|
|
|
84
84
|
(0, _useGridEditing.useGridEditing)(apiRef, props);
|
|
85
85
|
(0, _useGridFocus.useGridFocus)(apiRef, props);
|
|
86
86
|
(0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef, props);
|
|
87
|
-
(0, _useGridFilter.useGridFilter)(apiRef, props);
|
|
88
|
-
(0, _useGridSorting.useGridSorting)(apiRef, props);
|
|
87
|
+
(0, _useGridFilter.useGridFilter)(apiRef, props, configuration);
|
|
88
|
+
(0, _useGridSorting.useGridSorting)(apiRef, props, configuration);
|
|
89
89
|
(0, _useGridDensity.useGridDensity)(apiRef, props);
|
|
90
90
|
(0, _useGridColumnResize.useGridColumnResize)(apiRef, props);
|
|
91
91
|
(0, _useGridPagination.useGridPagination)(apiRef, props);
|
|
@@ -102,6 +102,10 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
102
102
|
const config = (0, _useGridConfiguration.useGridConfiguration)();
|
|
103
103
|
const cellAggregationResult = config.hooks.useCellAggregationResult(rowId, field);
|
|
104
104
|
const cellMode = editCellState ? _models.GridCellModes.Edit : _models.GridCellModes.View;
|
|
105
|
+
const {
|
|
106
|
+
value: forcedValue,
|
|
107
|
+
formattedValue: forcedFormattedValue
|
|
108
|
+
} = cellAggregationResult || {};
|
|
105
109
|
const cellParams = apiRef.current.getCellParamsForRow(rowId, field, row, {
|
|
106
110
|
colDef: column,
|
|
107
111
|
cellMode,
|
|
@@ -113,13 +117,11 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
113
117
|
hasFocus: (0, _useGridSelector.useGridSelector)(apiRef, () => {
|
|
114
118
|
const focus = (0, _gridFocusStateSelector.gridFocusCellSelector)(apiRef);
|
|
115
119
|
return focus?.id === rowId && focus.field === field;
|
|
116
|
-
})
|
|
120
|
+
}),
|
|
121
|
+
value: forcedValue,
|
|
122
|
+
formattedValue: forcedFormattedValue
|
|
117
123
|
});
|
|
118
124
|
cellParams.api = apiRef.current;
|
|
119
|
-
if (cellAggregationResult) {
|
|
120
|
-
cellParams.value = cellAggregationResult.value;
|
|
121
|
-
cellParams.formattedValue = column.valueFormatter ? column.valueFormatter(cellParams.value, row, column, apiRef) : cellParams.value;
|
|
122
|
-
}
|
|
123
125
|
const isSelected = (0, _useGridSelector.useGridSelector)(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
|
|
124
126
|
id: rowId,
|
|
125
127
|
field
|
|
@@ -38,6 +38,8 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
38
38
|
toolbarExportExcel: 'Download as Excel',
|
|
39
39
|
// Toolbar pivot button
|
|
40
40
|
toolbarPivot: 'Pivot',
|
|
41
|
+
// Toolbar charts button
|
|
42
|
+
toolbarCharts: 'Charts',
|
|
41
43
|
// Toolbar AI Assistant button
|
|
42
44
|
toolbarAssistant: 'AI Assistant',
|
|
43
45
|
// Columns management text
|
|
@@ -117,6 +119,7 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
117
119
|
columnMenuSortAsc: 'Sort by ASC',
|
|
118
120
|
columnMenuSortDesc: 'Sort by DESC',
|
|
119
121
|
columnMenuManagePivot: 'Manage pivot',
|
|
122
|
+
columnMenuManageCharts: 'Manage charts',
|
|
120
123
|
// Column header text
|
|
121
124
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
122
125
|
columnHeaderFiltersLabel: 'Show filters',
|
|
@@ -185,6 +188,7 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
185
188
|
rowReorderingHeaderName: 'Row reordering',
|
|
186
189
|
// Aggregation
|
|
187
190
|
aggregationMenuItemHeader: 'Aggregation',
|
|
191
|
+
aggregationFunctionLabelNone: 'none',
|
|
188
192
|
aggregationFunctionLabelSum: 'sum',
|
|
189
193
|
aggregationFunctionLabelAvg: 'avg',
|
|
190
194
|
aggregationFunctionLabelMin: 'min',
|
|
@@ -218,6 +222,31 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
218
222
|
pivotDragToValues: 'Drag here to create values',
|
|
219
223
|
pivotYearColumnHeaderName: '(Year)',
|
|
220
224
|
pivotQuarterColumnHeaderName: '(Quarter)',
|
|
225
|
+
// Charts configuration panel
|
|
226
|
+
chartsNoCharts: 'There are no charts available',
|
|
227
|
+
chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
228
|
+
chartsTabChart: 'Chart',
|
|
229
|
+
chartsTabFields: 'Fields',
|
|
230
|
+
chartsTabCustomize: 'Customize',
|
|
231
|
+
chartsCloseButton: 'Close charts configuration',
|
|
232
|
+
chartsSyncButtonLabel: 'Sync chart',
|
|
233
|
+
chartsSearchPlaceholder: 'Search fields',
|
|
234
|
+
chartsSearchLabel: 'Search fields',
|
|
235
|
+
chartsSearchClear: 'Clear search',
|
|
236
|
+
chartsNoFields: 'No fields',
|
|
237
|
+
chartsFieldBlocked: 'This field cannot be added to any section',
|
|
238
|
+
chartsCategories: 'Categories',
|
|
239
|
+
chartsSeries: 'Series',
|
|
240
|
+
chartsMenuAddToDimensions: dimensionLabel => `Add to ${dimensionLabel}`,
|
|
241
|
+
chartsMenuAddToValues: valuesLabel => `Add to ${valuesLabel}`,
|
|
242
|
+
chartsMenuMoveUp: 'Move up',
|
|
243
|
+
chartsMenuMoveDown: 'Move down',
|
|
244
|
+
chartsMenuMoveToTop: 'Move to top',
|
|
245
|
+
chartsMenuMoveToBottom: 'Move to bottom',
|
|
246
|
+
chartsMenuOptions: 'Field options',
|
|
247
|
+
chartsMenuRemove: 'Remove',
|
|
248
|
+
chartsDragToDimensions: dimensionLabel => `Drag here to use column as ${dimensionLabel}`,
|
|
249
|
+
chartsDragToValues: valuesLabel => `Drag here to use column as ${valuesLabel}`,
|
|
221
250
|
// AI Assistant panel
|
|
222
251
|
aiAssistantPanelTitle: 'AI Assistant',
|
|
223
252
|
aiAssistantPanelClose: 'Close AI Assistant',
|
package/esm/DataGrid/DataGrid.js
CHANGED
|
@@ -21,7 +21,9 @@ const configuration = {
|
|
|
21
21
|
useGridAriaAttributes,
|
|
22
22
|
useGridRowAriaAttributes,
|
|
23
23
|
useGridRowsOverridableMethods,
|
|
24
|
-
useCellAggregationResult: () => null
|
|
24
|
+
useCellAggregationResult: () => null,
|
|
25
|
+
useSortValueGetter: apiRef => apiRef.current.getCellValue,
|
|
26
|
+
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
29
|
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
@@ -78,8 +78,8 @@ export const useDataGridComponent = (apiRef, props, configuration) => {
|
|
|
78
78
|
useGridEditing(apiRef, props);
|
|
79
79
|
useGridFocus(apiRef, props);
|
|
80
80
|
useGridPreferencesPanel(apiRef, props);
|
|
81
|
-
useGridFilter(apiRef, props);
|
|
82
|
-
useGridSorting(apiRef, props);
|
|
81
|
+
useGridFilter(apiRef, props, configuration);
|
|
82
|
+
useGridSorting(apiRef, props, configuration);
|
|
83
83
|
useGridDensity(apiRef, props);
|
|
84
84
|
useGridColumnResize(apiRef, props);
|
|
85
85
|
useGridPagination(apiRef, props);
|
|
@@ -95,6 +95,10 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
95
95
|
const config = useGridConfiguration();
|
|
96
96
|
const cellAggregationResult = config.hooks.useCellAggregationResult(rowId, field);
|
|
97
97
|
const cellMode = editCellState ? GridCellModes.Edit : GridCellModes.View;
|
|
98
|
+
const {
|
|
99
|
+
value: forcedValue,
|
|
100
|
+
formattedValue: forcedFormattedValue
|
|
101
|
+
} = cellAggregationResult || {};
|
|
98
102
|
const cellParams = apiRef.current.getCellParamsForRow(rowId, field, row, {
|
|
99
103
|
colDef: column,
|
|
100
104
|
cellMode,
|
|
@@ -106,13 +110,11 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
106
110
|
hasFocus: useGridSelector(apiRef, () => {
|
|
107
111
|
const focus = gridFocusCellSelector(apiRef);
|
|
108
112
|
return focus?.id === rowId && focus.field === field;
|
|
109
|
-
})
|
|
113
|
+
}),
|
|
114
|
+
value: forcedValue,
|
|
115
|
+
formattedValue: forcedFormattedValue
|
|
110
116
|
});
|
|
111
117
|
cellParams.api = apiRef.current;
|
|
112
|
-
if (cellAggregationResult) {
|
|
113
|
-
cellParams.value = cellAggregationResult.value;
|
|
114
|
-
cellParams.formattedValue = column.valueFormatter ? column.valueFormatter(cellParams.value, row, column, apiRef) : cellParams.value;
|
|
115
|
-
}
|
|
116
118
|
const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
|
|
117
119
|
id: rowId,
|
|
118
120
|
field
|
|
@@ -32,6 +32,8 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
32
32
|
toolbarExportExcel: 'Download as Excel',
|
|
33
33
|
// Toolbar pivot button
|
|
34
34
|
toolbarPivot: 'Pivot',
|
|
35
|
+
// Toolbar charts button
|
|
36
|
+
toolbarCharts: 'Charts',
|
|
35
37
|
// Toolbar AI Assistant button
|
|
36
38
|
toolbarAssistant: 'AI Assistant',
|
|
37
39
|
// Columns management text
|
|
@@ -111,6 +113,7 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
111
113
|
columnMenuSortAsc: 'Sort by ASC',
|
|
112
114
|
columnMenuSortDesc: 'Sort by DESC',
|
|
113
115
|
columnMenuManagePivot: 'Manage pivot',
|
|
116
|
+
columnMenuManageCharts: 'Manage charts',
|
|
114
117
|
// Column header text
|
|
115
118
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
116
119
|
columnHeaderFiltersLabel: 'Show filters',
|
|
@@ -179,6 +182,7 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
179
182
|
rowReorderingHeaderName: 'Row reordering',
|
|
180
183
|
// Aggregation
|
|
181
184
|
aggregationMenuItemHeader: 'Aggregation',
|
|
185
|
+
aggregationFunctionLabelNone: 'none',
|
|
182
186
|
aggregationFunctionLabelSum: 'sum',
|
|
183
187
|
aggregationFunctionLabelAvg: 'avg',
|
|
184
188
|
aggregationFunctionLabelMin: 'min',
|
|
@@ -212,6 +216,31 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
212
216
|
pivotDragToValues: 'Drag here to create values',
|
|
213
217
|
pivotYearColumnHeaderName: '(Year)',
|
|
214
218
|
pivotQuarterColumnHeaderName: '(Quarter)',
|
|
219
|
+
// Charts configuration panel
|
|
220
|
+
chartsNoCharts: 'There are no charts available',
|
|
221
|
+
chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
222
|
+
chartsTabChart: 'Chart',
|
|
223
|
+
chartsTabFields: 'Fields',
|
|
224
|
+
chartsTabCustomize: 'Customize',
|
|
225
|
+
chartsCloseButton: 'Close charts configuration',
|
|
226
|
+
chartsSyncButtonLabel: 'Sync chart',
|
|
227
|
+
chartsSearchPlaceholder: 'Search fields',
|
|
228
|
+
chartsSearchLabel: 'Search fields',
|
|
229
|
+
chartsSearchClear: 'Clear search',
|
|
230
|
+
chartsNoFields: 'No fields',
|
|
231
|
+
chartsFieldBlocked: 'This field cannot be added to any section',
|
|
232
|
+
chartsCategories: 'Categories',
|
|
233
|
+
chartsSeries: 'Series',
|
|
234
|
+
chartsMenuAddToDimensions: dimensionLabel => `Add to ${dimensionLabel}`,
|
|
235
|
+
chartsMenuAddToValues: valuesLabel => `Add to ${valuesLabel}`,
|
|
236
|
+
chartsMenuMoveUp: 'Move up',
|
|
237
|
+
chartsMenuMoveDown: 'Move down',
|
|
238
|
+
chartsMenuMoveToTop: 'Move to top',
|
|
239
|
+
chartsMenuMoveToBottom: 'Move to bottom',
|
|
240
|
+
chartsMenuOptions: 'Field options',
|
|
241
|
+
chartsMenuRemove: 'Remove',
|
|
242
|
+
chartsDragToDimensions: dimensionLabel => `Drag here to use column as ${dimensionLabel}`,
|
|
243
|
+
chartsDragToValues: valuesLabel => `Drag here to use column as ${valuesLabel}`,
|
|
215
244
|
// AI Assistant panel
|
|
216
245
|
aiAssistantPanelTitle: 'AI Assistant',
|
|
217
246
|
aiAssistantPanelClose: 'Close AI Assistant',
|
|
@@ -41,7 +41,7 @@ function computeNewWidth(initialOffsetToSeparator, clickX, columnBounds, resizeD
|
|
|
41
41
|
} else {
|
|
42
42
|
newWidth += columnBounds.right - clickX;
|
|
43
43
|
}
|
|
44
|
-
return newWidth;
|
|
44
|
+
return Math.round(newWidth);
|
|
45
45
|
}
|
|
46
46
|
function computeOffsetToSeparator(clickX, columnBounds, resizeDirection) {
|
|
47
47
|
if (resizeDirection === 'Left') {
|
|
@@ -560,5 +560,5 @@ function updateProperty(element, property, delta) {
|
|
|
560
560
|
if (!element) {
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
|
-
element.style[property] = `${
|
|
563
|
+
element.style[property] = `${Math.round(parseFloat(element.style[property])) + delta}px`;
|
|
564
564
|
}
|
|
@@ -11,7 +11,7 @@ import { useGridRegisterPipeProcessor, useGridRegisterPipeApplier } from "../../
|
|
|
11
11
|
import { EMPTY_PINNED_COLUMN_FIELDS } from "./gridColumnsInterfaces.js";
|
|
12
12
|
import { hydrateColumnsWidth, createColumnsState, COLUMNS_DIMENSION_PROPERTIES } from "./gridColumnsUtils.js";
|
|
13
13
|
import { GridPreferencePanelsValue } from "../preferencesPanel/index.js";
|
|
14
|
-
import { gridPivotActiveSelector } from "../pivoting/
|
|
14
|
+
import { gridPivotActiveSelector, gridPivotInitialColumnsSelector } from "../pivoting/gridPivotingSelectors.js";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
export const columnsStateInitializer = (state, props, apiRef) => {
|
|
17
17
|
apiRef.current.caches.columns = {
|
|
@@ -82,13 +82,30 @@ export function useGridColumns(apiRef, props) {
|
|
|
82
82
|
}
|
|
83
83
|
}, [apiRef]);
|
|
84
84
|
const updateColumns = React.useCallback(columns => {
|
|
85
|
+
let columnsToUpdate = columns;
|
|
85
86
|
if (gridPivotActiveSelector(apiRef)) {
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
const nonPivotColumns = [];
|
|
88
|
+
const pivotColumns = [];
|
|
89
|
+
const pivotInitialColumns = gridPivotInitialColumnsSelector(apiRef);
|
|
90
|
+
columns.forEach(column => {
|
|
91
|
+
const isNonPivotColumn = pivotInitialColumns.has(column.field);
|
|
92
|
+
if (isNonPivotColumn) {
|
|
93
|
+
nonPivotColumns.push(column);
|
|
94
|
+
} else {
|
|
95
|
+
pivotColumns.push(column);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
if (nonPivotColumns.length > 0) {
|
|
99
|
+
apiRef.current.updateNonPivotColumns(nonPivotColumns);
|
|
100
|
+
}
|
|
101
|
+
if (pivotColumns.length === 0) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
columnsToUpdate = pivotColumns;
|
|
88
105
|
}
|
|
89
106
|
const columnsState = createColumnsState({
|
|
90
107
|
apiRef,
|
|
91
|
-
columnsToUpsert:
|
|
108
|
+
columnsToUpsert: columnsToUpdate,
|
|
92
109
|
initialState: undefined,
|
|
93
110
|
keepOnlyColumnsToUpsert: false,
|
|
94
111
|
updateInitialVisibilityModel: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
import { GridRowId } from "../../../models/gridRows.js";
|
|
2
|
+
import { GridRowEntry, GridRowId, GridValidRowModel } from "../../../models/gridRows.js";
|
|
3
3
|
import { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get the current filter model.
|
|
@@ -48,7 +48,7 @@ export declare const gridFilteredDescendantCountLookupSelector: (args_0: import(
|
|
|
48
48
|
*/
|
|
49
49
|
export declare const gridExpandedSortedRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
50
50
|
state: GridStateCommunity;
|
|
51
|
-
} | null>) =>
|
|
51
|
+
} | null>) => GridRowEntry<GridValidRowModel>[];
|
|
52
52
|
/**
|
|
53
53
|
* Get the id of the rows accessible after the filtering process.
|
|
54
54
|
* Does not contain the collapsed children.
|
|
@@ -64,7 +64,7 @@ export declare const gridExpandedSortedRowIdsSelector: (args_0: import("react").
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const gridFilteredSortedRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
66
66
|
state: GridStateCommunity;
|
|
67
|
-
} | null>) =>
|
|
67
|
+
} | null>) => GridRowEntry<GridValidRowModel>[];
|
|
68
68
|
/**
|
|
69
69
|
* Get the id of the rows accessible after the filtering process.
|
|
70
70
|
* Contains the collapsed children.
|
|
@@ -82,13 +82,21 @@ export declare const gridFilteredSortedRowIdsSelector: (args_0: import("react").
|
|
|
82
82
|
export declare const gridExpandedSortedRowTreeLevelPositionLookupSelector: (args_0: import("react").RefObject<{
|
|
83
83
|
state: GridStateCommunity;
|
|
84
84
|
} | null>) => Record<GridRowId, number>;
|
|
85
|
+
/**
|
|
86
|
+
* Get the id and the model of the rows per depth level, accessible after the filtering process.
|
|
87
|
+
* Returns an array of arrays, where each array index contains the rows for the depth level equal to the index.
|
|
88
|
+
* @category Filtering
|
|
89
|
+
*/
|
|
90
|
+
export declare const gridFilteredSortedDepthRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
91
|
+
state: GridStateCommunity;
|
|
92
|
+
} | null>) => GridRowEntry<GridValidRowModel>[][];
|
|
85
93
|
/**
|
|
86
94
|
* Get the id and the model of the top level rows accessible after the filtering process.
|
|
87
95
|
* @category Filtering
|
|
88
96
|
*/
|
|
89
97
|
export declare const gridFilteredSortedTopLevelRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
90
98
|
state: GridStateCommunity;
|
|
91
|
-
} | null>) =>
|
|
99
|
+
} | null>) => GridRowEntry<GridValidRowModel>[];
|
|
92
100
|
/**
|
|
93
101
|
* Get the amount of rows accessible after the filtering process.
|
|
94
102
|
* @category Filtering
|
|
@@ -107,16 +107,33 @@ export const gridExpandedSortedRowTreeLevelPositionLookupSelector = createSelect
|
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* Get the id and the model of the
|
|
110
|
+
* Get the id and the model of the rows per depth level, accessible after the filtering process.
|
|
111
|
+
* Returns an array of arrays, where each array index contains the rows for the depth level equal to the index.
|
|
111
112
|
* @category Filtering
|
|
112
113
|
*/
|
|
113
|
-
export const
|
|
114
|
+
export const gridFilteredSortedDepthRowEntriesSelector = createSelectorMemoized(gridFilteredSortedRowEntriesSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, (sortedRows, rowTree, rowTreeDepth) => {
|
|
114
115
|
if (rowTreeDepth < 2) {
|
|
115
|
-
return
|
|
116
|
+
return [sortedRows];
|
|
116
117
|
}
|
|
117
|
-
return
|
|
118
|
+
return sortedRows.reduce((acc, row) => {
|
|
119
|
+
const depth = rowTree[row.id]?.depth;
|
|
120
|
+
if (depth === undefined) {
|
|
121
|
+
return acc;
|
|
122
|
+
}
|
|
123
|
+
if (!acc[depth]) {
|
|
124
|
+
acc[depth] = [];
|
|
125
|
+
}
|
|
126
|
+
acc[depth].push(row);
|
|
127
|
+
return acc;
|
|
128
|
+
}, [[]]);
|
|
118
129
|
});
|
|
119
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Get the id and the model of the top level rows accessible after the filtering process.
|
|
133
|
+
* @category Filtering
|
|
134
|
+
*/
|
|
135
|
+
export const gridFilteredSortedTopLevelRowEntriesSelector = createSelector(gridFilteredSortedDepthRowEntriesSelector, filteredSortedDepthRows => filteredSortedDepthRows[0] ?? []);
|
|
136
|
+
|
|
120
137
|
/**
|
|
121
138
|
* Get the amount of rows accessible after the filtering process.
|
|
122
139
|
* @category Filtering
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
2
2
|
import { GridFilterModel } from "../../../models/gridFilterModel.js";
|
|
3
|
-
import { GridRowId, GridValidRowModel } from "../../../models/gridRows.js";
|
|
3
|
+
import { GridRowId, GridRowModel, GridValidRowModel } from "../../../models/gridRows.js";
|
|
4
|
+
import { GridColDef } from "../../../models/colDef/index.js";
|
|
4
5
|
export type GridFilterItemResult = {
|
|
5
6
|
[key: Required<GridFilterItem>['id']]: boolean;
|
|
6
7
|
};
|
|
@@ -52,6 +53,7 @@ export type GridAggregatedFilterItemApplier = (row: GridValidRowModel, shouldApp
|
|
|
52
53
|
export interface GridFilteringMethodParams {
|
|
53
54
|
isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
|
|
54
55
|
filterModel: GridFilterModel;
|
|
56
|
+
filterValueGetter: (row: GridRowModel, column: GridColDef) => any;
|
|
55
57
|
}
|
|
56
58
|
export type GridFilteringMethodValue = Omit<GridFilterState, 'filterModel'>;
|
|
57
59
|
/**
|