@mui/x-data-grid 8.9.2 → 8.10.1
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 +217 -6
- package/components/GridFooter.js +1 -1
- package/components/GridPagination.js +4 -3
- package/components/GridRow.js +8 -6
- package/components/virtualization/GridVirtualScroller.js +3 -3
- package/esm/DataGrid/index.js +1 -1
- package/esm/components/GridFooter.js +1 -1
- package/esm/components/GridPagination.js +3 -2
- package/esm/components/GridRow.js +8 -6
- package/esm/components/virtualization/GridVirtualScroller.js +3 -3
- package/esm/hooks/core/useGridVirtualizer.js +64 -44
- package/esm/hooks/features/dataSource/cache.js +0 -3
- package/esm/hooks/features/dataSource/gridDataSourceError.js +16 -16
- package/esm/hooks/features/dataSource/models.d.ts +11 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +9 -2
- package/esm/hooks/features/dataSource/utils.js +51 -52
- package/esm/hooks/features/dimensions/gridDimensionsApi.d.ts +2 -67
- package/esm/hooks/features/dimensions/useGridDimensions.js +20 -15
- package/esm/hooks/features/editing/useGridRowEditing.js +4 -1
- package/esm/hooks/features/export/serializers/csvSerializer.js +2 -3
- package/esm/hooks/features/export/useGridPrintExport.js +3 -8
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.js +1 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.js +3 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/esm/hooks/features/rowSelection/utils.js +5 -0
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/internals/utils/cache.js +0 -1
- package/esm/locales/nnNO.js +96 -107
- package/esm/material/index.js +2 -2
- package/esm/models/api/gridApiCommon.d.ts +1 -1
- package/esm/models/gridRowSelectionManager.js +0 -2
- package/esm/models/gridStateCommunity.d.ts +2 -0
- package/esm/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +5 -7
- package/esm/utils/cleanupTracking/TimerBasedCleanupTracking.js +2 -2
- package/hooks/core/useGridVirtualizer.js +62 -42
- package/hooks/features/dataSource/cache.js +0 -3
- package/hooks/features/dataSource/gridDataSourceError.js +16 -16
- package/hooks/features/dataSource/models.d.ts +11 -2
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +10 -3
- package/hooks/features/dataSource/utils.js +51 -52
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +2 -67
- package/hooks/features/dimensions/useGridDimensions.js +20 -15
- package/hooks/features/editing/useGridRowEditing.js +4 -1
- package/hooks/features/export/serializers/csvSerializer.js +2 -3
- package/hooks/features/export/useGridPrintExport.js +3 -8
- package/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/hooks/features/rowReorder/gridRowReorderInterfaces.js +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.js +9 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/hooks/features/rowSelection/utils.js +5 -0
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +8 -0
- package/internals/utils/cache.js +0 -1
- package/locales/nnNO.js +96 -107
- package/material/index.js +2 -2
- package/models/api/gridApiCommon.d.ts +1 -1
- package/models/gridRowSelectionManager.js +0 -2
- package/models/gridStateCommunity.d.ts +2 -0
- package/package.json +16 -18
- package/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +5 -7
- package/utils/cleanupTracking/TimerBasedCleanupTracking.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,217 @@
|
|
|
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.10.1
|
|
9
|
+
|
|
10
|
+
_Aug 15, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
The following are all team members who have contributed to this release:
|
|
18
|
+
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@8.10.1`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Fix scroll jumping (#19156) @romgrk
|
|
25
|
+
- [DataGrid] Fix scroll restoration (#19182) @romgrk
|
|
26
|
+
- [DataGrid] Fix "no row with id" error (#19193) @romgrk
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
29
|
+
|
|
30
|
+
Same changes as in `@mui/x-data-grid@8.10.1`.
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link "Premium plan")
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
35
|
+
|
|
36
|
+
### Date and Time Pickers
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-date-pickers@8.10.0`
|
|
39
|
+
|
|
40
|
+
Internal changes.
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
45
|
+
|
|
46
|
+
### Charts
|
|
47
|
+
|
|
48
|
+
- Axes can now be grouped by category when using `band` and `point` scales
|
|
49
|
+
|
|
50
|
+
<img width="643" height="455" alt="Bar chart with y-axis grouped per categories" src="https://github.com/user-attachments/assets/59044afe-bcc5-4152-8bf1-225db0635025" />
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-charts@8.10.1`
|
|
53
|
+
|
|
54
|
+
- [charts] Allow y-axis to be grouped (#19081) @JCQuintas
|
|
55
|
+
- [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
|
|
56
|
+
- [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
|
|
57
|
+
- [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
60
|
+
|
|
61
|
+
Same changes as in `@mui/x-charts@8.10.1`.
|
|
62
|
+
|
|
63
|
+
### Tree View
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-tree-view@8.10.1`
|
|
66
|
+
|
|
67
|
+
Internal changes.
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-tree-view@8.10.1`.
|
|
72
|
+
|
|
73
|
+
### Codemod
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-codemod@8.10.1`
|
|
76
|
+
|
|
77
|
+
Internal changes.
|
|
78
|
+
|
|
79
|
+
### Docs
|
|
80
|
+
|
|
81
|
+
- [docs] Add all planned charts on the overview page (#19077) @prakhargupta1
|
|
82
|
+
- [docs] Add future charts components link in the sidebar (#19140) @prakhargupta1
|
|
83
|
+
- [docs] Fix Heatmap docs duplicate text (#19138) @JCQuintas
|
|
84
|
+
- [docs] Remove preview from Toolbar & Funnel (#19131) @mnajdova
|
|
85
|
+
- [docs] Reproduce npm sparkline (#19089) @alexfauquette
|
|
86
|
+
|
|
87
|
+
### Core
|
|
88
|
+
|
|
89
|
+
- [core] Fix licensing model name (#19025) @oliviertassinari
|
|
90
|
+
- [core] Fix usage of `:catalog` for `@babel/runtime` (#19028) @oliviertassinari
|
|
91
|
+
- [core] Refactor virtualizer API (#18995) @romgrk
|
|
92
|
+
|
|
93
|
+
### Miscellaneous
|
|
94
|
+
|
|
95
|
+
- [code-infra] Remove namespaces (#19071) @Janpot
|
|
96
|
+
- [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
|
|
97
|
+
- [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
|
|
98
|
+
- [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
|
|
99
|
+
- [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
|
|
100
|
+
- [internal] Fix writing style action name @oliviertassinari
|
|
101
|
+
- [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
|
|
102
|
+
- [support-infra] Remove default issue label (#19104) @oliviertassinari
|
|
103
|
+
|
|
104
|
+
## 8.10.0
|
|
105
|
+
|
|
106
|
+
_Aug 8, 2025_
|
|
107
|
+
|
|
108
|
+
We'd like to extend a big thank you to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
109
|
+
|
|
110
|
+
- 📊 [`FunnelChart`](https://mui.com/x/react-charts/funnel/) marked as stable
|
|
111
|
+
- 📈 [Zoom slider](https://mui.com/x/react-charts/zoom-and-pan/#zoom-slider) and [Preview](https://mui.com/x/react-charts/zoom-and-pan/#preview) marked as stable
|
|
112
|
+
- 📈 Supporting [label groups](https://mui.com/x/react-charts/axis/#grouped-axes) in band and point axis
|
|
113
|
+
- 🌎 Improve Norwegian Nynorsk (nn-NO) locale on the Data Grid
|
|
114
|
+
- 🐞 Bugfixes
|
|
115
|
+
- 📚 Documentation improvements
|
|
116
|
+
|
|
117
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
118
|
+
@AnderzL7, @aqeelat, @dwrth, @noobyogi0010, @nusr, @sai6855
|
|
119
|
+
|
|
120
|
+
The following are all team members who have contributed to this release:
|
|
121
|
+
@arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @oliviertassinari, @rita-codes, @romgrk
|
|
122
|
+
|
|
123
|
+
### Data Grid
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid@8.10.0`
|
|
126
|
+
|
|
127
|
+
- [DataGrid] Move spread operator in `BaseSelect` to allow `variant` change (#19026) @dwrth
|
|
128
|
+
- [DataGrid] Use `use-sync-external-store` shim (#19063) @romgrk
|
|
129
|
+
- [DataGrid] Allow skipping cache in `dataSource.fetchRows()` API method (#18904) @MBilalShafi
|
|
130
|
+
- [DataGrid] Do not call `preProcessEditCellProps()` if cell is not editable based on `isCellEditable()` (#18405) @nusr
|
|
131
|
+
- [DataGrid] Fix `renderCountry` throwing an error when used in tree data (#19068) @cherniavskii
|
|
132
|
+
- [DataGrid] Fix performance issue for root level "select all" (#19015) @MBilalShafi
|
|
133
|
+
- [DataGrid] Fix pagination `slotProps` being ignored by the grid (#19095) @romgrk
|
|
134
|
+
- [l10n] Improve Norwegian Nynorsk (nn-NO) locale (#19076) @AnderzL7
|
|
135
|
+
|
|
136
|
+
#### `@mui/x-data-grid-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
137
|
+
|
|
138
|
+
Same changes as in `@mui/x-data-grid@8.10.0`, plus:
|
|
139
|
+
|
|
140
|
+
- [DataGridPro] Fix row reorder not working with column reorder disabled (#19016) @MBilalShafi
|
|
141
|
+
- [DataGridPro] Fix header filters cache sharing issue (#19090) @MBilalShafi
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-premium@8.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DataGridPremium] Allow additional derived columns customization via `valueFormatter` (#18982) @arminmeh
|
|
148
|
+
- [DataGridPremium] Fix complex `singleSelect` columns not working in pivot model (#18971) @cherniavskii
|
|
149
|
+
|
|
150
|
+
### Date and Time Pickers
|
|
151
|
+
|
|
152
|
+
#### `@mui/x-date-pickers@8.10.0`
|
|
153
|
+
|
|
154
|
+
- [pickers] `MuiPickersLayout-toolbar` is overlapping the Calendar in RTL `MobileDatePicker` variant (#18981) @rita-codes
|
|
155
|
+
|
|
156
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
157
|
+
|
|
158
|
+
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
159
|
+
|
|
160
|
+
### Charts
|
|
161
|
+
|
|
162
|
+
#### `@mui/x-charts@8.10.0`
|
|
163
|
+
|
|
164
|
+
- [charts] Add `groups` to `band` and `point` axis config (#18766) @JCQuintas
|
|
165
|
+
- [charts] Animation example using `motion` library (#18993) @JCQuintas
|
|
166
|
+
- [charts] Deprecate `Unstable_` radar exports (#19079) @JCQuintas
|
|
167
|
+
- [charts] Improve grouped axis logic (#19069) @JCQuintas
|
|
168
|
+
- [charts] Fix type assertion in axis highlight components (#19060) @sai6855
|
|
169
|
+
- [charts] Remove unnecessary type assertion in tooltip `valueFormatter` in heatmap (#19047) @sai6855
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-charts-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-charts@8.10.0`, plus:
|
|
174
|
+
|
|
175
|
+
- [charts-pro] Fix `slotProps.tooltip.trigger` not respected in `ScatterChartPro` and `FunnelChart` (#18902) @bernardobelchior
|
|
176
|
+
- [charts-pro] Fix zoom filtering adjusting axis too soon (#18992) @bernardobelchior
|
|
177
|
+
- [charts-pro] Mark `FunnelChart` as stable (#19048) @JCQuintas
|
|
178
|
+
- [charts-pro] Mark zoom slider and preview as stable (#19049) @JCQuintas
|
|
179
|
+
- [charts-pro] Refactor `createAxisFilterMapper` (#18998) @bernardobelchior
|
|
180
|
+
|
|
181
|
+
### Tree View
|
|
182
|
+
|
|
183
|
+
#### `@mui/x-tree-view@8.10.0`
|
|
184
|
+
|
|
185
|
+
Internal changes.
|
|
186
|
+
|
|
187
|
+
#### `@mui/x-tree-view-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
188
|
+
|
|
189
|
+
Same changes as in `@mui/x-tree-view@8.10.0`.
|
|
190
|
+
|
|
191
|
+
### Codemod
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-codemod@8.10.0`
|
|
194
|
+
|
|
195
|
+
Internal changes.
|
|
196
|
+
|
|
197
|
+
### Docs
|
|
198
|
+
|
|
199
|
+
- [docs] Add CSS bundler breaking change to migration guide (#17436) @romgrk
|
|
200
|
+
- [docs] `RichTreeViewPro` demo for dragging via custom drag-handle is not working properly (#19008) @rita-codes
|
|
201
|
+
- [docs] Fix broken link to D3 in Charts (#19020) @oliviertassinari
|
|
202
|
+
- [docs] Revise the Charts Animation doc (#18990) @mapache-salvaje
|
|
203
|
+
- [docs] Fix incorrect code in line chart preview (#19023) @noobyogi0010
|
|
204
|
+
- [docs] Improve bundling instructions for the Data Grid (#19065) @romgrk
|
|
205
|
+
- [docs] Reduce image size in the inventory grid demo (#19004) @arminmeh
|
|
206
|
+
|
|
207
|
+
### Core
|
|
208
|
+
|
|
209
|
+
- [core] Fix ESLint reference name @oliviertassinari
|
|
210
|
+
|
|
211
|
+
### Miscellaneous
|
|
212
|
+
|
|
213
|
+
- [infra] Remove bundle size tracking for subpaths (#19072) @Janpot
|
|
214
|
+
- [infra] Accept `PORT` env on `docs:dev` script (#19014) @JCQuintas
|
|
215
|
+
- [infra] Skip codesandbox iframe demos in regressions tests (#18970) @cherniavskii
|
|
216
|
+
- [infra] Remove package.json `module` field (#18961) @Janpot
|
|
217
|
+
- [internal] Remove peer dependency on `@mui/system` (#19062) @aqeelat
|
|
218
|
+
|
|
8
219
|
## 8.9.2
|
|
9
220
|
|
|
10
221
|
_Jul 31, 2025_
|
|
@@ -418,8 +629,8 @@ Same changes as in `@mui/x-tree-view@8.7.0`, plus:
|
|
|
418
629
|
|
|
419
630
|
- [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
|
|
420
631
|
- [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
|
|
421
|
-
- [code-infra] Migrate to flat
|
|
422
|
-
- [code-infra] Refactor
|
|
632
|
+
- [code-infra] Migrate to flat ESLint config (#18562) @brijeshb42
|
|
633
|
+
- [code-infra] Refactor ESLint config (#18643) @LukasTy
|
|
423
634
|
- [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
|
|
424
635
|
- [infra] Move pushArgos script to code-infra (#18667) @Janpot
|
|
425
636
|
- [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
|
|
@@ -1333,7 +1544,7 @@ Same changes as in `@mui/x-tree-view@8.2.0`.
|
|
|
1333
1544
|
- [core] Fix all Vale errors @oliviertassinari
|
|
1334
1545
|
- [core] Move `loadStyleSheets` to internals and use it in data grid and charts (#17548) @bernardobelchior
|
|
1335
1546
|
- [core] Remove empty version (#17582) @oliviertassinari
|
|
1336
|
-
- [core] Remove
|
|
1547
|
+
- [core] Remove ESLint from codemod spec files (#17443) @alexfauquette
|
|
1337
1548
|
- [core] Remove unnecessary versions (#17597) @oliviertassinari
|
|
1338
1549
|
- [code-infra] Allow postinstall scripts for packages requesting it (#17635) @LukasTy
|
|
1339
1550
|
- [code-infra] Data Grid `vitest` changes (#17619) @JCQuintas
|
|
@@ -6827,7 +7038,7 @@ Same changes as in `@mui/x-date-pickers@7.8.0`.
|
|
|
6827
7038
|
|
|
6828
7039
|
### Core
|
|
6829
7040
|
|
|
6830
|
-
- [core] Add
|
|
7041
|
+
- [core] Add ESLint rule to restrict import from `../internals` root (#13633) @JCQuintas
|
|
6831
7042
|
- [docs-infra] Sync `\_app` folder with monorepo (#13582) @Janpot
|
|
6832
7043
|
- [license] Allow usage of Charts and Tree View Pro package for old premium licenses (#13619) @flaviendelangle
|
|
6833
7044
|
|
|
@@ -6965,7 +7176,7 @@ Same changes as in `@mui/x-date-pickers@7.7.0`.
|
|
|
6965
7176
|
|
|
6966
7177
|
- [charts] Add watermark on the pro `ResponsiveChartContainer` (#13398) @alexfauquette
|
|
6967
7178
|
- [charts] Allow to specify y-axis configuration (#13438) @alexfauquette
|
|
6968
|
-
- [charts] Fix
|
|
7179
|
+
- [charts] Fix ESLint for react compiler (#13444) @alexfauquette
|
|
6969
7180
|
- [charts] Improve themeAugmentation typing (#13433) @noraleonte
|
|
6970
7181
|
- [charts] Move the `ZAxisContextProvider` by default in the `ChartContainer` (#13465) @alexfauquette
|
|
6971
7182
|
- [charts] Use plugins to define series extremum and colors (#13397) @alexfauquette
|
|
@@ -7512,7 +7723,7 @@ Same changes as in `@mui/x-date-pickers@7.3.1`.
|
|
|
7512
7723
|
- [core] Use `describeTreeView` for focus tests (#12698) @flaviendelangle
|
|
7513
7724
|
- [core] Use `describeTreeView` for type-ahead tests (#12811) @flaviendelangle
|
|
7514
7725
|
- [code-infra] Change package manager to `pnpm` (#11875) @LukasTy
|
|
7515
|
-
- [code-infra] Closer sync with
|
|
7726
|
+
- [code-infra] Closer sync with ESLint config of codebase (#12864) @oliviertassinari
|
|
7516
7727
|
- [support-infra] Add release announcement to GitHub workflows (#11867) (#12843) @michelengelen
|
|
7517
7728
|
|
|
7518
7729
|
## 7.3.0
|
package/components/GridFooter.js
CHANGED
|
@@ -32,7 +32,7 @@ const GridFooter = exports.GridFooter = (0, _forwardRef.forwardRef)(function Gri
|
|
|
32
32
|
rowCount: totalTopLevelRowCount,
|
|
33
33
|
visibleRowCount: visibleTopLevelRowCount
|
|
34
34
|
})) : null;
|
|
35
|
-
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pagination, {});
|
|
35
|
+
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pagination, (0, _extends2.default)({}, rootProps.slotProps?.pagination));
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridFooterContainer.GridFooterContainer, (0, _extends2.default)({}, props, {
|
|
37
37
|
ref: ref,
|
|
38
38
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.GridPagination = GridPagination;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _styles = require("@mui/material/styles");
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -67,7 +68,7 @@ function GridPagination() {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPaginationRoot, {
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPaginationRoot, (0, _extends2.default)({
|
|
71
72
|
as: rootProps.slots.basePagination,
|
|
72
73
|
count: rowCount,
|
|
73
74
|
page: computedPage,
|
|
@@ -76,7 +77,7 @@ function GridPagination() {
|
|
|
76
77
|
onPageChange: handlePageChange,
|
|
77
78
|
onRowsPerPageChange: handlePageSizeChange,
|
|
78
79
|
disabled: disabled
|
|
79
|
-
});
|
|
80
|
+
}, rootProps.slotProps?.basePagination));
|
|
80
81
|
}
|
|
81
82
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
82
83
|
// ----------------------------- Warning --------------------------------
|
package/components/GridRow.js
CHANGED
|
@@ -31,6 +31,7 @@ var _constants = require("../internals/constants");
|
|
|
31
31
|
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
32
32
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
33
33
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
34
|
+
var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
|
|
34
35
|
var _GridScrollbarFillerCell = require("./GridScrollbarFillerCell");
|
|
35
36
|
var _getPinnedCellOffset = require("../internals/utils/getPinnedCellOffset");
|
|
36
37
|
var _useGridConfiguration = require("../hooks/utils/useGridConfiguration");
|
|
@@ -85,6 +86,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
85
86
|
const columnPositions = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnPositionsSelector);
|
|
86
87
|
const rowReordering = rootProps.rowReordering;
|
|
87
88
|
const isRowReorderingEnabled = (0, _useGridSelector.useGridSelector)(apiRef, isRowReorderingEnabledSelector, rowReordering);
|
|
89
|
+
const isRowDragActive = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowReorderSelector.gridIsRowDragActiveSelector);
|
|
88
90
|
const handleRef = (0, _useForkRef.default)(ref, refProp);
|
|
89
91
|
const rowNode = (0, _gridRowsSelector.gridRowNodeSelector)(apiRef, rowId);
|
|
90
92
|
const editing = (0, _useGridSelector.useGridSelector)(apiRef, _gridEditingSelectors.gridRowIsEditingSelector, {
|
|
@@ -198,6 +200,11 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
198
200
|
}
|
|
199
201
|
return rowStyle;
|
|
200
202
|
}, [isNotVisible, rowHeight, styleProp, heightEntry, rootProps.rowSpacingType]);
|
|
203
|
+
|
|
204
|
+
// HACK: Sometimes, the rowNode has already been removed from the state but the row is still rendered.
|
|
205
|
+
if (!rowNode) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
201
208
|
const rowClassNames = apiRef.current.unstable_applyPipeProcessors('rowClassName', [], rowId);
|
|
202
209
|
const ariaAttributes = getRowAriaAttributes(rowNode, index);
|
|
203
210
|
if (typeof rootProps.getRowClassName === 'function') {
|
|
@@ -209,11 +216,6 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
209
216
|
});
|
|
210
217
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
211
218
|
}
|
|
212
|
-
|
|
213
|
-
// XXX: fix this properly
|
|
214
|
-
if (!rowNode) {
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
219
|
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = _constants.PinnedColumnPosition.NONE) => {
|
|
218
220
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
219
221
|
if (cellColSpanInfo?.spannedByColSpan) {
|
|
@@ -237,7 +239,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
237
239
|
const isReorderCell = column.field === '__reorder__';
|
|
238
240
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
239
241
|
const canReorderRow = isRowReorderingEnabled && !sortModel.length && treeDepth <= 1;
|
|
240
|
-
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
242
|
+
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow || isRowDragActive);
|
|
241
243
|
const cellIsNotVisible = pinnedPosition === _constants.PinnedColumnPosition.VIRTUAL;
|
|
242
244
|
const showLeftBorder = (0, _cellBorderUtils.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
243
245
|
const showRightBorder = (0, _cellBorderUtils.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
@@ -90,7 +90,6 @@ function GridVirtualScroller(props) {
|
|
|
90
90
|
getContainerProps,
|
|
91
91
|
getScrollerProps,
|
|
92
92
|
getContentProps,
|
|
93
|
-
getRenderZoneProps,
|
|
94
93
|
getScrollbarVerticalProps,
|
|
95
94
|
getScrollbarHorizontalProps,
|
|
96
95
|
getRows,
|
|
@@ -119,11 +118,12 @@ function GridVirtualScroller(props) {
|
|
|
119
118
|
virtualScroller: virtualScroller
|
|
120
119
|
})]
|
|
121
120
|
}), getOverlay(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerContent.GridVirtualScrollerContent, (0, _extends2.default)({}, getContentProps(), {
|
|
122
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridVirtualScrollerRenderZone.GridVirtualScrollerRenderZone,
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridVirtualScrollerRenderZone.GridVirtualScrollerRenderZone, {
|
|
122
|
+
role: "rowgroup",
|
|
123
123
|
children: [rows, /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.detailPanels, {
|
|
124
124
|
virtualScroller: virtualScroller
|
|
125
125
|
})]
|
|
126
|
-
})
|
|
126
|
+
})
|
|
127
127
|
})), hasBottomFiller && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerFiller.GridVirtualScrollerFiller, {
|
|
128
128
|
rowsLength: rows.length
|
|
129
129
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.bottomContainer, {
|
package/esm/DataGrid/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '../index.css';
|
|
2
2
|
export * from "./DataGrid.js";
|
|
@@ -24,7 +24,7 @@ const GridFooter = forwardRef(function GridFooter(props, ref) {
|
|
|
24
24
|
rowCount: totalTopLevelRowCount,
|
|
25
25
|
visibleRowCount: visibleTopLevelRowCount
|
|
26
26
|
})) : null;
|
|
27
|
-
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, {});
|
|
27
|
+
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));
|
|
28
28
|
return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({}, props, {
|
|
29
29
|
ref: ref,
|
|
30
30
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { styled } from '@mui/material/styles';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -59,7 +60,7 @@ function GridPagination() {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];
|
|
62
|
-
return /*#__PURE__*/_jsx(GridPaginationRoot, {
|
|
63
|
+
return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({
|
|
63
64
|
as: rootProps.slots.basePagination,
|
|
64
65
|
count: rowCount,
|
|
65
66
|
page: computedPage,
|
|
@@ -68,7 +69,7 @@ function GridPagination() {
|
|
|
68
69
|
onPageChange: handlePageChange,
|
|
69
70
|
onRowsPerPageChange: handlePageSizeChange,
|
|
70
71
|
disabled: disabled
|
|
71
|
-
});
|
|
72
|
+
}, rootProps.slotProps?.basePagination));
|
|
72
73
|
}
|
|
73
74
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
74
75
|
// ----------------------------- Warning --------------------------------
|
|
@@ -25,6 +25,7 @@ import { GRID_DETAIL_PANEL_TOGGLE_FIELD, PinnedColumnPosition } from "../interna
|
|
|
25
25
|
import { gridSortModelSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
26
26
|
import { gridRowMaximumTreeDepthSelector, gridRowNodeSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
27
27
|
import { gridEditRowsStateSelector, gridRowIsEditingSelector } from "../hooks/features/editing/gridEditingSelectors.js";
|
|
28
|
+
import { gridIsRowDragActiveSelector } from "../hooks/features/rowReorder/gridRowReorderSelector.js";
|
|
28
29
|
import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFillerCell.js";
|
|
29
30
|
import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
|
|
30
31
|
import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
|
|
@@ -78,6 +79,7 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
78
79
|
const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
|
|
79
80
|
const rowReordering = rootProps.rowReordering;
|
|
80
81
|
const isRowReorderingEnabled = useGridSelector(apiRef, isRowReorderingEnabledSelector, rowReordering);
|
|
82
|
+
const isRowDragActive = useGridSelector(apiRef, gridIsRowDragActiveSelector);
|
|
81
83
|
const handleRef = useForkRef(ref, refProp);
|
|
82
84
|
const rowNode = gridRowNodeSelector(apiRef, rowId);
|
|
83
85
|
const editing = useGridSelector(apiRef, gridRowIsEditingSelector, {
|
|
@@ -191,6 +193,11 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
191
193
|
}
|
|
192
194
|
return rowStyle;
|
|
193
195
|
}, [isNotVisible, rowHeight, styleProp, heightEntry, rootProps.rowSpacingType]);
|
|
196
|
+
|
|
197
|
+
// HACK: Sometimes, the rowNode has already been removed from the state but the row is still rendered.
|
|
198
|
+
if (!rowNode) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
194
201
|
const rowClassNames = apiRef.current.unstable_applyPipeProcessors('rowClassName', [], rowId);
|
|
195
202
|
const ariaAttributes = getRowAriaAttributes(rowNode, index);
|
|
196
203
|
if (typeof rootProps.getRowClassName === 'function') {
|
|
@@ -202,11 +209,6 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
202
209
|
});
|
|
203
210
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
204
211
|
}
|
|
205
|
-
|
|
206
|
-
// XXX: fix this properly
|
|
207
|
-
if (!rowNode) {
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
212
|
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedColumnPosition.NONE) => {
|
|
211
213
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
212
214
|
if (cellColSpanInfo?.spannedByColSpan) {
|
|
@@ -230,7 +232,7 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
230
232
|
const isReorderCell = column.field === '__reorder__';
|
|
231
233
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
232
234
|
const canReorderRow = isRowReorderingEnabled && !sortModel.length && treeDepth <= 1;
|
|
233
|
-
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
235
|
+
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow || isRowDragActive);
|
|
234
236
|
const cellIsNotVisible = pinnedPosition === PinnedColumnPosition.VIRTUAL;
|
|
235
237
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
236
238
|
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
@@ -82,7 +82,6 @@ function GridVirtualScroller(props) {
|
|
|
82
82
|
getContainerProps,
|
|
83
83
|
getScrollerProps,
|
|
84
84
|
getContentProps,
|
|
85
|
-
getRenderZoneProps,
|
|
86
85
|
getScrollbarVerticalProps,
|
|
87
86
|
getScrollbarHorizontalProps,
|
|
88
87
|
getRows,
|
|
@@ -111,11 +110,12 @@ function GridVirtualScroller(props) {
|
|
|
111
110
|
virtualScroller: virtualScroller
|
|
112
111
|
})]
|
|
113
112
|
}), getOverlay(), /*#__PURE__*/_jsx(Content, _extends({}, getContentProps(), {
|
|
114
|
-
children: /*#__PURE__*/_jsxs(RenderZone,
|
|
113
|
+
children: /*#__PURE__*/_jsxs(RenderZone, {
|
|
114
|
+
role: "rowgroup",
|
|
115
115
|
children: [rows, /*#__PURE__*/_jsx(rootProps.slots.detailPanels, {
|
|
116
116
|
virtualScroller: virtualScroller
|
|
117
117
|
})]
|
|
118
|
-
})
|
|
118
|
+
})
|
|
119
119
|
})), hasBottomFiller && /*#__PURE__*/_jsx(SpaceFiller, {
|
|
120
120
|
rowsLength: rows.length
|
|
121
121
|
}), /*#__PURE__*/_jsx(rootProps.slots.bottomContainer, {
|