@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.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 +228 -7
- package/DataGrid/DataGrid.js +9 -9
- package/components/GridPagination.js +2 -1
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridCell.js +7 -10
- package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +2 -3
- package/components/toolbar/GridToolbarColumnsButton.js +3 -4
- package/components/toolbar/GridToolbarDensitySelector.js +3 -4
- package/components/toolbar/GridToolbarExportContainer.js +3 -4
- package/components/toolbar/GridToolbarFilterButton.d.ts +2 -0
- package/components/toolbar/GridToolbarFilterButton.js +7 -6
- package/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/components/virtualization/GridVirtualScroller.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -3
- package/constants/localeTextConstants.js +0 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/useGridDimensions.js +3 -19
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
- package/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/hooks/features/listView/index.d.ts +1 -0
- package/hooks/features/listView/index.js +1 -0
- package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
- package/hooks/features/overlays/useGridOverlays.js +19 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +0 -9
- package/hooks/features/rowSelection/utils.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/index.js +1 -1
- package/locales/arSD.js +0 -1
- package/locales/beBY.js +0 -1
- package/locales/bgBG.js +0 -1
- package/locales/csCZ.js +0 -1
- package/locales/daDK.js +0 -1
- package/locales/deDE.js +10 -13
- package/locales/elGR.js +0 -1
- package/locales/esES.js +10 -13
- package/locales/faIR.js +0 -1
- package/locales/fiFI.js +0 -1
- package/locales/frFR.js +0 -1
- package/locales/heIL.js +0 -1
- package/locales/hrHR.js +0 -1
- package/locales/huHU.js +0 -1
- package/locales/isIS.js +0 -1
- package/locales/itIT.js +0 -1
- package/locales/jaJP.js +0 -1
- package/locales/koKR.js +0 -1
- package/locales/nbNO.js +0 -1
- package/locales/nlNL.js +0 -1
- package/locales/nnNO.js +0 -1
- package/locales/plPL.js +0 -1
- package/locales/ptBR.js +10 -13
- package/locales/ptPT.js +10 -13
- package/locales/roRO.js +0 -1
- package/locales/ruRU.js +0 -1
- package/locales/skSK.js +0 -1
- package/locales/svSE.js +0 -1
- package/locales/trTR.js +0 -1
- package/locales/ukUA.js +0 -1
- package/locales/urPK.js +0 -1
- package/locales/viVN.js +0 -1
- package/locales/zhCN.js +10 -13
- package/locales/zhHK.js +0 -1
- package/locales/zhTW.js +0 -1
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +0 -1
- package/models/colDef/gridColDef.d.ts +24 -24
- package/models/props/DataGridProps.d.ts +9 -9
- package/modern/DataGrid/DataGrid.js +9 -9
- package/modern/components/GridPagination.js +2 -1
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridCell.js +7 -10
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +2 -3
- package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -4
- package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -4
- package/modern/components/toolbar/GridToolbarExportContainer.js +3 -4
- package/modern/components/toolbar/GridToolbarFilterButton.js +7 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/modern/components/virtualization/GridVirtualScroller.js +5 -3
- package/modern/constants/dataGridPropsDefaultValues.js +2 -3
- package/modern/constants/localeTextConstants.js +0 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +3 -19
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/modern/hooks/features/listView/index.js +1 -0
- package/modern/hooks/features/overlays/useGridOverlays.js +19 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +0 -9
- package/modern/hooks/features/rowSelection/utils.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +0 -1
- package/modern/locales/beBY.js +0 -1
- package/modern/locales/bgBG.js +0 -1
- package/modern/locales/csCZ.js +0 -1
- package/modern/locales/daDK.js +0 -1
- package/modern/locales/deDE.js +10 -13
- package/modern/locales/elGR.js +0 -1
- package/modern/locales/esES.js +10 -13
- package/modern/locales/faIR.js +0 -1
- package/modern/locales/fiFI.js +0 -1
- package/modern/locales/frFR.js +0 -1
- package/modern/locales/heIL.js +0 -1
- package/modern/locales/hrHR.js +0 -1
- package/modern/locales/huHU.js +0 -1
- package/modern/locales/isIS.js +0 -1
- package/modern/locales/itIT.js +0 -1
- package/modern/locales/jaJP.js +0 -1
- package/modern/locales/koKR.js +0 -1
- package/modern/locales/nbNO.js +0 -1
- package/modern/locales/nlNL.js +0 -1
- package/modern/locales/nnNO.js +0 -1
- package/modern/locales/plPL.js +0 -1
- package/modern/locales/ptBR.js +10 -13
- package/modern/locales/ptPT.js +10 -13
- package/modern/locales/roRO.js +0 -1
- package/modern/locales/ruRU.js +0 -1
- package/modern/locales/skSK.js +0 -1
- package/modern/locales/svSE.js +0 -1
- package/modern/locales/trTR.js +0 -1
- package/modern/locales/ukUA.js +0 -1
- package/modern/locales/urPK.js +0 -1
- package/modern/locales/viVN.js +0 -1
- package/modern/locales/zhCN.js +10 -13
- package/modern/locales/zhHK.js +0 -1
- package/modern/locales/zhTW.js +0 -1
- package/node/DataGrid/DataGrid.js +9 -9
- package/node/components/GridPagination.js +2 -1
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridCell.js +7 -10
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/node/components/columnSelection/GridHeaderCheckbox.js +2 -3
- package/node/components/toolbar/GridToolbarColumnsButton.js +3 -4
- package/node/components/toolbar/GridToolbarDensitySelector.js +3 -4
- package/node/components/toolbar/GridToolbarExportContainer.js +3 -4
- package/node/components/toolbar/GridToolbarFilterButton.js +7 -6
- package/node/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/node/components/virtualization/GridVirtualScroller.js +5 -3
- package/node/constants/dataGridPropsDefaultValues.js +2 -3
- package/node/constants/localeTextConstants.js +0 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -18
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/node/hooks/features/listView/index.js +16 -0
- package/node/hooks/features/overlays/useGridOverlays.js +21 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +0 -9
- package/node/hooks/features/rowSelection/utils.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/node/index.js +1 -1
- package/node/locales/arSD.js +0 -1
- package/node/locales/beBY.js +0 -1
- package/node/locales/bgBG.js +0 -1
- package/node/locales/csCZ.js +0 -1
- package/node/locales/daDK.js +0 -1
- package/node/locales/deDE.js +10 -13
- package/node/locales/elGR.js +0 -1
- package/node/locales/esES.js +10 -13
- package/node/locales/faIR.js +0 -1
- package/node/locales/fiFI.js +0 -1
- package/node/locales/frFR.js +0 -1
- package/node/locales/heIL.js +0 -1
- package/node/locales/hrHR.js +0 -1
- package/node/locales/huHU.js +0 -1
- package/node/locales/isIS.js +0 -1
- package/node/locales/itIT.js +0 -1
- package/node/locales/jaJP.js +0 -1
- package/node/locales/koKR.js +0 -1
- package/node/locales/nbNO.js +0 -1
- package/node/locales/nlNL.js +0 -1
- package/node/locales/nnNO.js +0 -1
- package/node/locales/plPL.js +0 -1
- package/node/locales/ptBR.js +10 -13
- package/node/locales/ptPT.js +10 -13
- package/node/locales/roRO.js +0 -1
- package/node/locales/ruRU.js +0 -1
- package/node/locales/skSK.js +0 -1
- package/node/locales/svSE.js +0 -1
- package/node/locales/trTR.js +0 -1
- package/node/locales/ukUA.js +0 -1
- package/node/locales/urPK.js +0 -1
- package/node/locales/viVN.js +0 -1
- package/node/locales/zhCN.js +10 -13
- package/node/locales/zhHK.js +0 -1
- package/node/locales/zhTW.js +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,133 @@
|
|
|
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
|
+
## v8.0.0-alpha.2
|
|
9
|
+
|
|
10
|
+
_Nov 29, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 👨🏽💻 Improve resize performance on the Data Gird.
|
|
15
|
+
- `<ChartDataProvider />` and `<ChartsSurface />` components are now fully divided — [Learn more](https://next.mui.com/x/react-charts/composition/#overview).
|
|
16
|
+
- Users can create their own HTML components using chart data — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
|
|
17
|
+
- 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
|
|
18
|
+
- 🌍 Improve Dutch locale on the Date and Time Pickers components.
|
|
19
|
+
- 🐞 Bugfixes
|
|
20
|
+
- 📚 Documentation improvements
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
|
+
@dloeda, @headironc, @jedesroches, @k-rajat19, @lauri865, @mathzdev, @nphmuller, @zinoroman.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@arminmeh, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @oliviertassinari.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### Breaking changes
|
|
32
|
+
|
|
33
|
+
- The `<GridOverlays />` component is not exported anymore.
|
|
34
|
+
- The `indeterminateCheckboxAction` prop has been removed. Clicking on an indeterminate checkbox "selects" the unselected descendants.
|
|
35
|
+
- The `apiRef.current.resize()` method was removed.
|
|
36
|
+
- The default value of the `rowSelectionPropagation` prop has been changed to `{ parents: true, descendants: true }` which means that the selection will be propagated to the parents and descendants by default.
|
|
37
|
+
To revert to the previous behavior, pass `rowSelectionPropagation` as `{ parents: false, descendants: false }`.
|
|
38
|
+
- If `estimatedRowCount` is used, the text provided to the [Table Pagination](/material-ui/api/table-pagination/) component from the Material UI library is updated and requires additional translations. Check the example at the end of [Index-based pagination section](/x/react-data-grid/pagination/#index-based-pagination).
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid@v8.0.0-alpha.2`
|
|
41
|
+
|
|
42
|
+
- [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15634) @jedesroches
|
|
43
|
+
- [DataGrid] Clear timers on unmount (#15620) @cherniavskii
|
|
44
|
+
- [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
|
|
45
|
+
- [DataGrid] Improve resize performance (#15549) @lauri865
|
|
46
|
+
- [DataGrid] Make estimation label more accurate (#15632) @arminmeh
|
|
47
|
+
- [DataGrid] Remove `<GridOverlays />` export (#15573) @k-rajat19
|
|
48
|
+
- [DataGrid] Remove `indeterminateCheckboxAction` prop (#15522) @MBilalShafi
|
|
49
|
+
- [DataGrid] Remove try/catch from `<GridCell />` due to performance issues (#15616) @lauri865
|
|
50
|
+
- [DataGrid] Remove unused `resize` method (#15599) @cherniavskii
|
|
51
|
+
- [DataGrid] Support column virtualization with dynamic row height (#15541) @cherniavskii
|
|
52
|
+
- [DataGrid] Update the default value for `rowSelectionPropagation` (#15523) @MBilalShafi
|
|
53
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
|
|
54
|
+
- [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-data-grid-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
57
|
+
|
|
58
|
+
Same changes as in `@mui/x-data-grid@v8.0.0-alpha.2`, plus:
|
|
59
|
+
|
|
60
|
+
- [DataGridPro] Fix header filtering with `boolean` column type (#15528) @k-rajat19
|
|
61
|
+
- [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15622) @zinoroman
|
|
62
|
+
- [DataGridPro] Fix selection propagation issue on initialization (#15461) @MBilalShafi
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-data-grid-premium@v8.0.0-alpha.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.2`.
|
|
67
|
+
|
|
68
|
+
### Date and Time Pickers
|
|
69
|
+
|
|
70
|
+
#### Breaking changes
|
|
71
|
+
|
|
72
|
+
- The props received by the `layout` and the `toolbar` slots have been reworked — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#do-not-pass-the-section-type-as-a-generic).
|
|
73
|
+
|
|
74
|
+
- The `TSection` generic of the `FieldRef` type has been replaced with the `TValue` generic — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-date-pickers@v8.0.0-alpha.2`
|
|
77
|
+
|
|
78
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
|
|
79
|
+
- [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15552) @flaviendelangle
|
|
80
|
+
- [pickers] Improve validation internals (#15419) @flaviendelangle
|
|
81
|
+
- [pickers] Remove `TSection` and strictly type `TValue` (#15434) @flaviendelangle
|
|
82
|
+
- [pickers] Remove `orientation`, `isLandscape`, `isRtl`, `wrapperVariant` and `disabled` props from `PickersLayout` (#15494) @flaviendelangle
|
|
83
|
+
- [pickers] Use the new `ownerState` in `<PickersCalendarHeader />`, `<PickersArrowSwitcher />` and `<DayCalendarSkeleton />` (#15499) @flaviendelangle
|
|
84
|
+
- [pickers] Use the new `ownerState` object in all the field components (#15510) @flaviendelangle
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-date-pickers-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
87
|
+
|
|
88
|
+
Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.2`.
|
|
89
|
+
|
|
90
|
+
### Charts
|
|
91
|
+
|
|
92
|
+
#### Breaking changes
|
|
93
|
+
|
|
94
|
+
- Charts Container don't have a `<div />` wrapping them anymore. All props are now passed to the root `<svg />` instead of the `<div />`.
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-charts@v8.0.0-alpha.2`
|
|
97
|
+
|
|
98
|
+
- [charts] Allow the creation of custom HTML components using charts data (#15511) @JCQuintas
|
|
99
|
+
- [charts] Flatten imports from `@mui/utils` and `@mui/system` (#15603) @alexfauquette
|
|
100
|
+
- [charts] Introduce the plugin system (#15513) @alexfauquette
|
|
101
|
+
- [charts] Prevent invalid `releasePointerCapture` (#15602) @alexfauquette
|
|
102
|
+
- [charts] Fix custom Tooltip demos (#15631) @alexfauquette
|
|
103
|
+
|
|
104
|
+
#### `@mui/x-charts-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
105
|
+
|
|
106
|
+
Same changes as in `@mui/x-charts@v8.0.0-alpha.2`.
|
|
107
|
+
|
|
108
|
+
### Tree View
|
|
109
|
+
|
|
110
|
+
#### `@mui/x-tree-view@v8.0.0-alpha.2`
|
|
111
|
+
|
|
112
|
+
- [TreeView] Flatten import from `@mui/utils` and `@mui/system` (#15604) @alexfauquette
|
|
113
|
+
|
|
114
|
+
#### `@mui/x-tree-view-pro@v8.0.0-alpha.2`
|
|
115
|
+
|
|
116
|
+
Same changes as in `@mui/x-tree-view@v8.0.0-alpha.2`.
|
|
117
|
+
|
|
118
|
+
### Docs
|
|
119
|
+
|
|
120
|
+
- [docs] Fix 404 links (#15575) @oliviertassinari
|
|
121
|
+
- [docs] Fix bash comments (#15571) @oliviertassinari
|
|
122
|
+
- [docs] Fix Pickers theme augmentation example (#15672) @LukasTy
|
|
123
|
+
- [docs] Replace use of "e.g." with "for example" (#15572) @oliviertassinari
|
|
124
|
+
- [docs] Update stale `new` and `preview` tags in v8 docs (#15547) @JCQuintas
|
|
125
|
+
- [docs] Fix layout shift image on Tree View docs (#15626) @oliviertassinari
|
|
126
|
+
- [docs] Fix `anchorEl` API page for charts (#15625) @oliviertassinari
|
|
127
|
+
- [docs] Add documentation for the list view feature (#15344) @KenanYusuf
|
|
128
|
+
|
|
129
|
+
### Core
|
|
130
|
+
|
|
131
|
+
- [core] Follow `()` function convention for docs @oliviertassinari
|
|
132
|
+
- [core] Remove dead translation key (#15566) @oliviertassinari
|
|
133
|
+
- [code-infra] Auto-merge `@types/node` bumps (#15591) @LukasTy
|
|
134
|
+
|
|
8
135
|
## v8.0.0-alpha.1
|
|
9
136
|
|
|
10
137
|
_Nov 22, 2024_
|
|
@@ -17,8 +144,6 @@ We'd like to offer a big thanks to the 16 contributors who made this release pos
|
|
|
17
144
|
- 🐞 Bugfixes
|
|
18
145
|
- 📚 Documentation improvements
|
|
19
146
|
|
|
20
|
-
### Breaking change
|
|
21
|
-
|
|
22
147
|
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
148
|
@CarlosLopezLg, @headironc, @hendrikpeilke, @k-rajat19, @lhilgert9, @viktormelin.
|
|
24
149
|
Following are all team members who have contributed to this release:
|
|
@@ -56,7 +181,7 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
|
|
|
56
181
|
#### Breaking change
|
|
57
182
|
|
|
58
183
|
- The `FieldValueType` type has been renamed to `PickerValueType` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables).
|
|
59
|
-
- The `toolbar` and `layout` slots no longer receive the
|
|
184
|
+
- The `toolbar` and `layout` slots no longer receive the `disabled` and `readOnly` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
|
|
60
185
|
|
|
61
186
|
#### `@mui/x-date-pickers@v8.0.0-alpha.1`
|
|
62
187
|
|
|
@@ -64,9 +189,9 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
|
|
|
64
189
|
- [pickers] React 19 support (#15342) @arminmeh
|
|
65
190
|
- [pickers] Add new properties to `PickerOwnerState` and `PickerContextValue` (#15415) @flaviendelangle
|
|
66
191
|
- [pickers] Always use `props.value` when it changes (#15490) @flaviendelangle
|
|
67
|
-
- [pickers] Ensure internal value timezone is updated
|
|
192
|
+
- [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
|
|
68
193
|
- [pickers] Fix unused code in `<PickersToolbar />` component (#15515) @LukasTy
|
|
69
|
-
- [pickers] Remove
|
|
194
|
+
- [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
|
|
70
195
|
- [pickers] Remove the form props from the layout and the toolbar slots (#15492) @flaviendelangle
|
|
71
196
|
- [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15532) @flaviendelangle
|
|
72
197
|
- [TimePicker] Prevent mouse events after `touchend` event (#15346) @arthurbalduini
|
|
@@ -82,12 +207,14 @@ Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
|
|
|
82
207
|
#### Breaking change
|
|
83
208
|
|
|
84
209
|
- The DX of the Tooltip customization has been refactored
|
|
210
|
+
|
|
85
211
|
- The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
|
|
86
|
-
- The `popper`, `axisContent`,
|
|
212
|
+
- The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
|
|
87
213
|
- To override the tooltip content, use the `useItemTooltip` or `useAxisTooltip` hook to get the data, and wrap your component in `ChartsTooltipContainer` to follow the pointer position.
|
|
88
214
|
- To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
|
|
89
215
|
|
|
90
216
|
- The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
|
|
217
|
+
|
|
91
218
|
- This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
|
|
92
219
|
If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
|
|
93
220
|
- The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
|
|
@@ -338,6 +465,100 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
|
|
|
338
465
|
- [release] v8 preparation (#15054) @michelengelen
|
|
339
466
|
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
|
|
340
467
|
|
|
468
|
+
## 7.23.0
|
|
469
|
+
|
|
470
|
+
_Nov 29, 2024_
|
|
471
|
+
|
|
472
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
473
|
+
|
|
474
|
+
- ✨ Support for a new display mode on the Data Grid with the [List View feature](https://mui.com/x/react-data-grid/list-view/), offering an extremely flexible way to render datasets and enabling developers to adapt how data is displayed across different screen sizes.
|
|
475
|
+
|
|
476
|
+
https://github.com/user-attachments/assets/61286adc-03fc-4323-9739-8ca726fcc16c
|
|
477
|
+
|
|
478
|
+
- ⚛️ React 19 support
|
|
479
|
+
- 📚 Documentation improvements
|
|
480
|
+
- 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
|
|
481
|
+
- 🌍 Improve Dutch locale on the Date and Time Picker components.
|
|
482
|
+
- 🐞 Bugfixes
|
|
483
|
+
|
|
484
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
485
|
+
@dloeda, @headironc, @mathzdev, @nphmuller, @lhilgert9, @lauri865.
|
|
486
|
+
Following are all team members who have contributed to this release:
|
|
487
|
+
@oliviertassinari, @arminmeh, @KenanYusuf, @flaviendelangle, @MBilalShafi.
|
|
488
|
+
|
|
489
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
490
|
+
|
|
491
|
+
### Data Grid
|
|
492
|
+
|
|
493
|
+
#### `@mui/x-data-grid@v7.23.0`
|
|
494
|
+
|
|
495
|
+
- [DataGrid] React 19 support (#15557) @arminmeh
|
|
496
|
+
- [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15642) @jedesroches
|
|
497
|
+
- [DataGrid] Fix last separator not being hidden when grid is scrollable (#15551) @KenanYusuf
|
|
498
|
+
- [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
|
|
499
|
+
- [DataGrid] Fix row-spanning in combination with column-pinning (#15460) @lhilgert9
|
|
500
|
+
- [DataGrid] Improve resize performance (#15592) @lauri865
|
|
501
|
+
- [DataGrid] Support column virtualization with dynamic row height (#15567) @cherniavskii
|
|
502
|
+
- [DataGrid] Improve `GridCell` performance (#15621) @lauri865
|
|
503
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
|
|
504
|
+
- [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
|
|
505
|
+
|
|
506
|
+
#### `@mui/x-data-grid-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
507
|
+
|
|
508
|
+
Same changes as in `@mui/x-data-grid@v7.23.0`, plus:
|
|
509
|
+
|
|
510
|
+
- [DataGridPro] Fix header filtering with `boolean` column type (#15640) @k-rajat19
|
|
511
|
+
- [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15643) @zinoroman
|
|
512
|
+
- [DataGridPro] Fix selection propagation issue on initialization (#15593) @MBilalShafi
|
|
513
|
+
|
|
514
|
+
#### `@mui/x-data-grid-premium@v7.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
515
|
+
|
|
516
|
+
Same changes as in `@mui/x-data-grid-pro@v7.23.0`.
|
|
517
|
+
|
|
518
|
+
### Date and Time Pickers
|
|
519
|
+
|
|
520
|
+
#### `@mui/x-date-pickers@v7.23.0`
|
|
521
|
+
|
|
522
|
+
- [pickers] React 19 support (#15557) @arminmeh
|
|
523
|
+
- [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15653) @flaviendelangle
|
|
524
|
+
- [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15544) @flaviendelangle
|
|
525
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
|
|
526
|
+
|
|
527
|
+
#### `@mui/x-date-pickers-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
528
|
+
|
|
529
|
+
Same changes as in `@mui/x-date-pickers@v7.23.0`.
|
|
530
|
+
|
|
531
|
+
### Charts
|
|
532
|
+
|
|
533
|
+
#### `@mui/x-charts@v7.23.0`
|
|
534
|
+
|
|
535
|
+
- [charts] React 19 support (#15557) @arminmeh
|
|
536
|
+
- [charts] Prevent invalid `releasePointerCapture` (#15609) @alexfauquette
|
|
537
|
+
|
|
538
|
+
#### `@mui/x-charts-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
539
|
+
|
|
540
|
+
Same changes as in `@mui/x-charts@v7.23.0`.
|
|
541
|
+
|
|
542
|
+
### Tree View
|
|
543
|
+
|
|
544
|
+
#### `@mui/x-tree-view@v7.23.0`
|
|
545
|
+
|
|
546
|
+
- [TreeView] React 19 support (#15557) @arminmeh
|
|
547
|
+
|
|
548
|
+
#### `@mui/x-tree-view-pro@7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
549
|
+
|
|
550
|
+
Same changes as in `@mui/x-tree-view@7.23.0`.
|
|
551
|
+
|
|
552
|
+
### Docs
|
|
553
|
+
|
|
554
|
+
- [docs] Add data caching to lazy loaded detail panel demo (#15555) @cherniavskii
|
|
555
|
+
- [docs] Remove selectors section from list view docs (#15639) @KenanYusuf
|
|
556
|
+
- [docs] Add documentation for the list view feature (#15344) @KenanYusuf
|
|
557
|
+
|
|
558
|
+
### Core
|
|
559
|
+
|
|
560
|
+
- [core] Update @mui/monorepo (#15574) @oliviertassinari
|
|
561
|
+
|
|
341
562
|
## v7.22.3
|
|
342
563
|
|
|
343
564
|
_Nov 21, 2024_
|
|
@@ -4803,7 +5024,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
|
4803
5024
|
|
|
4804
5025
|
The `useClearableField` hook API has been simplified to now take a `props` parameter instead of a `fieldProps`, `InputProps`, `clearable`, `onClear`, `slots` and `slotProps` parameters.
|
|
4805
5026
|
|
|
4806
|
-
You should now be able to directly pass the returned value from your field hook (
|
|
5027
|
+
You should now be able to directly pass the returned value from your field hook (for example `useDateField`) to `useClearableField`
|
|
4807
5028
|
|
|
4808
5029
|
```diff
|
|
4809
5030
|
const fieldResponse = useDateField(props);
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -325,14 +325,6 @@ DataGridRaw.propTypes = {
|
|
|
325
325
|
clipboardExport: PropTypes.bool,
|
|
326
326
|
csvExport: PropTypes.bool
|
|
327
327
|
}), PropTypes.bool]),
|
|
328
|
-
/**
|
|
329
|
-
* If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
|
|
330
|
-
* will select all the rows under it.
|
|
331
|
-
* If `deselect`, it will deselect all the rows under it.
|
|
332
|
-
* Works only if `checkboxSelection` is enabled.
|
|
333
|
-
* @default "deselect"
|
|
334
|
-
*/
|
|
335
|
-
indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
|
|
336
328
|
/**
|
|
337
329
|
* The initial state of the DataGrid.
|
|
338
330
|
* The data in it will be set in the state on initialization but will not be controlled.
|
|
@@ -766,5 +758,13 @@ DataGridRaw.propTypes = {
|
|
|
766
758
|
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
767
759
|
* @default false
|
|
768
760
|
*/
|
|
769
|
-
unstable_rowSpanning: PropTypes.bool
|
|
761
|
+
unstable_rowSpanning: PropTypes.bool,
|
|
762
|
+
/**
|
|
763
|
+
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
764
|
+
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
765
|
+
* For datasets with a large number of columns, this can cause performance issues.
|
|
766
|
+
* The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
|
|
767
|
+
* @default false
|
|
768
|
+
*/
|
|
769
|
+
virtualizeColumnsWithAutoRowHeight: PropTypes.bool
|
|
770
770
|
};
|
|
@@ -50,7 +50,8 @@ const defaultLabelDisplayedRows = ({
|
|
|
50
50
|
if (!estimated) {
|
|
51
51
|
return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
const estimateLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
|
|
54
|
+
return `${from}–${to} of ${count !== -1 ? count : estimateLabel}`;
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
// A mutable version of a readonly array.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GridOverlayType } from '../../hooks/features/overlays/useGridOverlays';
|
|
3
2
|
import { GridLoadingOverlayVariant } from '../GridLoadingOverlay';
|
|
3
|
+
import { GridSlotsComponent } from '../../models';
|
|
4
|
+
export type GridOverlayType = keyof Pick<GridSlotsComponent, 'noRowsOverlay' | 'noResultsOverlay' | 'loadingOverlay'> | null;
|
|
4
5
|
interface GridOverlaysProps {
|
|
5
6
|
overlayType: GridOverlayType;
|
|
6
7
|
loadingOverlayVariant: GridLoadingOverlayVariant | null;
|
|
7
8
|
}
|
|
8
|
-
export declare function
|
|
9
|
-
export declare namespace
|
|
9
|
+
export declare function GridOverlayWrapper(props: React.PropsWithChildren<GridOverlaysProps>): React.JSX.Element;
|
|
10
|
+
export declare namespace GridOverlayWrapper {
|
|
10
11
|
var propTypes: any;
|
|
11
12
|
}
|
|
12
13
|
export {};
|
|
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
|
|
|
52
52
|
};
|
|
53
53
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
54
54
|
};
|
|
55
|
-
function GridOverlayWrapper(props) {
|
|
55
|
+
export function GridOverlayWrapper(props) {
|
|
56
56
|
const apiRef = useGridApiContext();
|
|
57
57
|
const rootProps = useGridRootProps();
|
|
58
58
|
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
@@ -83,26 +83,4 @@ process.env.NODE_ENV !== "production" ? GridOverlayWrapper.propTypes = {
|
|
|
83
83
|
// ----------------------------------------------------------------------
|
|
84
84
|
loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
|
|
85
85
|
overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
|
|
86
|
-
} : void 0;
|
|
87
|
-
process.env.NODE_ENV !== "production" ? GridOverlays.propTypes = {
|
|
88
|
-
// ----------------------------- Warning --------------------------------
|
|
89
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
90
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
91
|
-
// ----------------------------------------------------------------------
|
|
92
|
-
loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
|
|
93
|
-
overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay'])
|
|
94
|
-
} : void 0;
|
|
95
|
-
export function GridOverlays(props) {
|
|
96
|
-
const {
|
|
97
|
-
overlayType
|
|
98
|
-
} = props;
|
|
99
|
-
const rootProps = useGridRootProps();
|
|
100
|
-
if (!overlayType) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
const Overlay = rootProps.slots?.[overlayType];
|
|
104
|
-
const overlayProps = rootProps.slotProps?.[overlayType];
|
|
105
|
-
return /*#__PURE__*/_jsx(GridOverlayWrapper, _extends({}, props, {
|
|
106
|
-
children: /*#__PURE__*/_jsx(Overlay, _extends({}, overlayProps))
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
86
|
+
} : void 0;
|
package/components/base/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import { useGridSelector, objectShallowCompare } from "../../hooks/utils/useGrid
|
|
|
15
15
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
16
16
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
17
17
|
import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
18
|
-
import { MissingRowIdError } from "../../hooks/features/rows/useGridParamsApi.js";
|
|
19
18
|
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
|
|
20
19
|
import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
|
|
21
20
|
import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
|
|
@@ -114,16 +113,13 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
114
113
|
// This is required because `.getCellParams` tries to get the `state.rows.tree` entry
|
|
115
114
|
// associated with `rowId`/`fieldId`, but this selector runs after the state has been
|
|
116
115
|
// updated, while `rowId`/`fieldId` reference an entry in the old state.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return result;
|
|
121
|
-
} catch (error) {
|
|
122
|
-
if (error instanceof MissingRowIdError) {
|
|
123
|
-
return EMPTY_CELL_PARAMS;
|
|
124
|
-
}
|
|
125
|
-
throw error;
|
|
116
|
+
const row = apiRef.current.getRow(rowId);
|
|
117
|
+
if (!row) {
|
|
118
|
+
return EMPTY_CELL_PARAMS;
|
|
126
119
|
}
|
|
120
|
+
const result = apiRef.current.getCellParams(rowId, field);
|
|
121
|
+
result.api = apiRef.current;
|
|
122
|
+
return result;
|
|
127
123
|
}, objectShallowCompare);
|
|
128
124
|
const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
|
|
129
125
|
id: rowId,
|
|
@@ -211,6 +207,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
211
207
|
padding: 0,
|
|
212
208
|
opacity: 0,
|
|
213
209
|
width: 0,
|
|
210
|
+
height: 0,
|
|
214
211
|
border: 0
|
|
215
212
|
};
|
|
216
213
|
}
|
|
@@ -79,12 +79,11 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
79
79
|
if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
83
|
-
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
82
|
+
const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
84
83
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
85
84
|
ref: handleRef,
|
|
86
85
|
tabIndex: tabIndex,
|
|
87
|
-
checked:
|
|
86
|
+
checked: isChecked && !isIndeterminate,
|
|
88
87
|
onChange: handleChange,
|
|
89
88
|
className: classes.root,
|
|
90
89
|
inputProps: {
|
|
@@ -92,12 +92,11 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
92
92
|
React.useEffect(() => {
|
|
93
93
|
return apiRef.current.subscribeEvent('rowSelectionChange', handleSelectionChange);
|
|
94
94
|
}, [apiRef, handleSelectionChange]);
|
|
95
|
-
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
96
|
-
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
95
|
+
const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
97
96
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
98
97
|
ref: ref,
|
|
99
98
|
indeterminate: isIndeterminate,
|
|
100
|
-
checked:
|
|
99
|
+
checked: isChecked && !isIndeterminate,
|
|
101
100
|
onChange: handleChange,
|
|
102
101
|
className: classes.root,
|
|
103
102
|
inputProps: {
|
|
@@ -36,7 +36,7 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
36
36
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
37
37
|
title: apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
38
38
|
enterDelay: 1000
|
|
39
|
-
},
|
|
39
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
40
40
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
41
41
|
ref: ref,
|
|
42
42
|
id: columnButtonId,
|
|
@@ -45,10 +45,9 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
|
|
|
45
45
|
"aria-haspopup": "menu",
|
|
46
46
|
"aria-expanded": isOpen,
|
|
47
47
|
"aria-controls": isOpen ? columnPanelId : undefined,
|
|
48
|
-
startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {})
|
|
49
|
-
}, buttonProps, {
|
|
48
|
+
startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {}),
|
|
50
49
|
onClick: showColumns
|
|
51
|
-
}, rootProps.slotProps?.baseButton, {
|
|
50
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
52
51
|
children: apiRef.current.getLocaleText('toolbarColumns')
|
|
53
52
|
}))
|
|
54
53
|
}));
|
|
@@ -83,7 +83,7 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
83
83
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
84
84
|
title: apiRef.current.getLocaleText('toolbarDensityLabel'),
|
|
85
85
|
enterDelay: 1000
|
|
86
|
-
},
|
|
86
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
87
87
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
88
88
|
ref: handleRef,
|
|
89
89
|
size: "small",
|
|
@@ -92,10 +92,9 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
92
92
|
"aria-haspopup": "menu",
|
|
93
93
|
"aria-expanded": open,
|
|
94
94
|
"aria-controls": open ? densityMenuId : undefined,
|
|
95
|
-
id: densityButtonId
|
|
96
|
-
}, buttonProps, {
|
|
95
|
+
id: densityButtonId,
|
|
97
96
|
onClick: handleDensitySelectorOpen
|
|
98
|
-
}, rootProps.slotProps?.baseButton, {
|
|
97
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
99
98
|
children: apiRef.current.getLocaleText('toolbarDensity')
|
|
100
99
|
}))
|
|
101
100
|
})), /*#__PURE__*/_jsx(GridMenu, {
|
|
@@ -42,7 +42,7 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
42
42
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
43
43
|
title: apiRef.current.getLocaleText('toolbarExportLabel'),
|
|
44
44
|
enterDelay: 1000
|
|
45
|
-
},
|
|
45
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
46
46
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
47
47
|
ref: handleRef,
|
|
48
48
|
size: "small",
|
|
@@ -51,10 +51,9 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
|
|
|
51
51
|
"aria-label": apiRef.current.getLocaleText('toolbarExportLabel'),
|
|
52
52
|
"aria-haspopup": "menu",
|
|
53
53
|
"aria-controls": open ? exportMenuId : undefined,
|
|
54
|
-
id: exportButtonId
|
|
55
|
-
}, buttonProps, {
|
|
54
|
+
id: exportButtonId,
|
|
56
55
|
onClick: handleMenuOpen
|
|
57
|
-
}, rootProps.slotProps?.baseButton, {
|
|
56
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
58
57
|
children: apiRef.current.getLocaleText('toolbarExport')
|
|
59
58
|
}))
|
|
60
59
|
})), /*#__PURE__*/_jsx(GridMenu, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
3
|
import { TooltipProps } from '@mui/material/Tooltip';
|
|
4
|
+
import { BadgeProps } from '@mui/material/Badge';
|
|
4
5
|
export interface GridToolbarFilterButtonProps {
|
|
5
6
|
/**
|
|
6
7
|
* The props used for each slot inside.
|
|
@@ -9,6 +10,7 @@ export interface GridToolbarFilterButtonProps {
|
|
|
9
10
|
slotProps?: {
|
|
10
11
|
button?: Partial<ButtonProps>;
|
|
11
12
|
tooltip?: Partial<TooltipProps>;
|
|
13
|
+
badge?: Partial<BadgeProps>;
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
16
|
declare const GridToolbarFilterButton: React.ForwardRefExoticComponent<GridToolbarFilterButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -37,6 +37,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
37
37
|
} = props;
|
|
38
38
|
const buttonProps = slotProps.button || {};
|
|
39
39
|
const tooltipProps = slotProps.tooltip || {};
|
|
40
|
+
const badgeProps = slotProps.badge || {};
|
|
40
41
|
const apiRef = useGridApiContext();
|
|
41
42
|
const rootProps = useGridRootProps();
|
|
42
43
|
const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);
|
|
@@ -94,7 +95,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
94
95
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
95
96
|
title: tooltipContentNode,
|
|
96
97
|
enterDelay: 1000
|
|
97
|
-
},
|
|
98
|
+
}, rootProps.slotProps?.baseTooltip, tooltipProps, {
|
|
98
99
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
99
100
|
ref: ref,
|
|
100
101
|
id: filterButtonId,
|
|
@@ -103,14 +104,14 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
103
104
|
"aria-controls": isOpen ? filterPanelId : undefined,
|
|
104
105
|
"aria-expanded": isOpen,
|
|
105
106
|
"aria-haspopup": true,
|
|
106
|
-
startIcon: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
|
|
107
|
+
startIcon: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, _extends({
|
|
107
108
|
badgeContent: activeFilters.length,
|
|
108
|
-
color: "primary"
|
|
109
|
+
color: "primary"
|
|
110
|
+
}, rootProps.slotProps?.baseBadge, badgeProps, {
|
|
109
111
|
children: /*#__PURE__*/_jsx(rootProps.slots.openFilterButtonIcon, {})
|
|
110
|
-
})
|
|
111
|
-
}, buttonProps, {
|
|
112
|
+
})),
|
|
112
113
|
onClick: toggleFilter
|
|
113
|
-
}, rootProps.slotProps?.baseButton, {
|
|
114
|
+
}, rootProps.slotProps?.baseButton, buttonProps, {
|
|
114
115
|
children: apiRef.current.getLocaleText('toolbarFilters')
|
|
115
116
|
}))
|
|
116
117
|
}));
|
|
@@ -78,6 +78,7 @@ function GridToolbarQuickFilter(props) {
|
|
|
78
78
|
apiRef.current.setQuickFilterValues(newQuickFilterValues);
|
|
79
79
|
}, [apiRef, quickFilterParser]);
|
|
80
80
|
const debouncedUpdateSearchValue = React.useMemo(() => debounce(updateSearchValue, debounceMs), [updateSearchValue, debounceMs]);
|
|
81
|
+
React.useEffect(() => debouncedUpdateSearchValue.clear, [debouncedUpdateSearchValue]);
|
|
81
82
|
const handleSearchValueChange = React.useCallback(event => {
|
|
82
83
|
const newSearchValue = event.target.value;
|
|
83
84
|
setSearchValue(newSearchValue);
|
|
@@ -10,7 +10,6 @@ import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
|
10
10
|
import { gridDimensionsSelector } from "../../hooks/features/dimensions/index.js";
|
|
11
11
|
import { useGridVirtualScroller } from "../../hooks/features/virtualization/useGridVirtualScroller.js";
|
|
12
12
|
import { useGridOverlays } from "../../hooks/features/overlays/useGridOverlays.js";
|
|
13
|
-
import { GridOverlays as Overlays } from "../base/GridOverlays.js";
|
|
14
13
|
import { GridHeaders } from "../GridHeaders.js";
|
|
15
14
|
import { GridMainContainer as Container } from "./GridMainContainer.js";
|
|
16
15
|
import { GridTopContainer as TopContainer } from "./GridTopContainer.js";
|
|
@@ -55,7 +54,10 @@ function GridVirtualScroller(props) {
|
|
|
55
54
|
const apiRef = useGridApiContext();
|
|
56
55
|
const rootProps = useGridRootProps();
|
|
57
56
|
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
58
|
-
const
|
|
57
|
+
const {
|
|
58
|
+
getOverlay,
|
|
59
|
+
overlaysProps
|
|
60
|
+
} = useGridOverlays();
|
|
59
61
|
const classes = useUtilityClasses(rootProps, dimensions, overlaysProps.loadingOverlayVariant);
|
|
60
62
|
const virtualScroller = useGridVirtualScroller();
|
|
61
63
|
const {
|
|
@@ -84,7 +86,7 @@ function GridVirtualScroller(props) {
|
|
|
84
86
|
position: "top",
|
|
85
87
|
virtualScroller: virtualScroller
|
|
86
88
|
})]
|
|
87
|
-
}),
|
|
89
|
+
}), getOverlay(), /*#__PURE__*/_jsx(Content, _extends({}, getContentProps(), {
|
|
88
90
|
children: /*#__PURE__*/_jsxs(RenderZone, _extends({}, getRenderZoneProps(), {
|
|
89
91
|
children: [rows, /*#__PURE__*/_jsx(rootProps.slots.detailPanels, {
|
|
90
92
|
virtualScroller: virtualScroller
|
|
@@ -34,8 +34,6 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
34
34
|
hideFooterSelectedRowCount: false,
|
|
35
35
|
ignoreDiacritics: false,
|
|
36
36
|
ignoreValueFormatterDuringExport: false,
|
|
37
|
-
// TODO v8: Update to 'select'
|
|
38
|
-
indeterminateCheckboxAction: 'deselect',
|
|
39
37
|
keepColumnPositionIfDraggedOutside: false,
|
|
40
38
|
keepNonExistentRowsSelected: false,
|
|
41
39
|
loading: false,
|
|
@@ -56,5 +54,6 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
56
54
|
sortingMode: 'client',
|
|
57
55
|
sortingOrder: ['asc', 'desc', null],
|
|
58
56
|
throttleRowsMs: 0,
|
|
59
|
-
unstable_rowSpanning: false
|
|
57
|
+
unstable_rowSpanning: false,
|
|
58
|
+
virtualizeColumnsWithAutoRowHeight: false
|
|
60
59
|
};
|