@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.3
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 +330 -7
- package/DataGrid/DataGrid.js +9 -17
- 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 +6 -4
- 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 -4
- package/constants/localeTextConstants.js +0 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +3 -6
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/useGridDimensions.js +3 -19
- package/hooks/features/editing/useGridCellEditing.js +3 -3
- package/hooks/features/editing/useGridRowEditing.js +3 -3
- 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/rows/gridRowsInterfaces.d.ts +1 -8
- package/hooks/features/rows/gridRowsSelector.d.ts +0 -1
- package/hooks/features/rows/gridRowsSelector.js +0 -1
- package/hooks/features/rows/gridRowsUtils.js +0 -9
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.js +12 -14
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/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 +14 -17
- 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 +12 -15
- 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/events/gridEventLookup.d.ts +1 -0
- package/models/gridDataSource.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +9 -17
- package/modern/DataGrid/DataGrid.js +9 -17
- 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 +6 -4
- 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 -4
- package/modern/constants/localeTextConstants.js +0 -1
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +3 -19
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +3 -3
- 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/rows/gridRowsSelector.js +0 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +12 -14
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/modern/index.js +1 -1
- package/modern/internals/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 +14 -17
- 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 +12 -15
- 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 -17
- 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 +6 -4
- 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 -4
- package/node/constants/localeTextConstants.js +0 -1
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -18
- package/node/hooks/features/editing/useGridCellEditing.js +2 -2
- package/node/hooks/features/editing/useGridRowEditing.js +2 -2
- 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/rows/gridRowsSelector.js +1 -2
- package/node/hooks/features/rows/gridRowsUtils.js +0 -9
- package/node/hooks/features/rows/index.js +0 -7
- package/node/hooks/features/rows/useGridRows.js +11 -13
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +55 -15
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- 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 +14 -17
- 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 +12 -15
- 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,235 @@
|
|
|
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.0.0-alpha.3
|
|
9
|
+
|
|
10
|
+
_Dec 5, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 💫 Support [Server-side lazy loading](https://mui.com/x/react-data-grid/server-side-data/lazy-loading/) on the Data Grid. Use [data source](https://mui.com/x/react-data-grid/server-side-data/#data-source) to fetch a range of rows on demand and update the rows in the same way as described in [Infinite loading](https://mui.com/x/react-data-grid/row-updates/#infinite-loading) and [Lazy loading](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) without the need to use any additional event listeners and callbacks.
|
|
15
|
+
- 🎯 Improved [data caching](https://mui.com/x/react-data-grid/server-side-data/#data-caching). Check out our [recommendations](https://mui.com/x/react-data-grid/server-side-data/#improving-the-cache-hit-rate) for improving the cache hit rate.
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@ihsanberkozcan, @k-rajat19, @perezShaked.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@arminmeh, @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- The "Select all" checkbox is now checked when all the selectable rows are selected, ignoring rows that are not selectable because of the `isRowSelectable` prop.
|
|
29
|
+
- The `rowPositionsDebounceMs` prop was removed.
|
|
30
|
+
- The `gridRowsDataRowIdToIdLookupSelector` selector was removed. Use the `gridRowsLookupSelector` selector in combination with the `getRowId()` API method instead.
|
|
31
|
+
```diff
|
|
32
|
+
-const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
|
33
|
+
-const rowId = idToIdLookup[id]
|
|
34
|
+
+const rowsLookup = gridRowsLookupSelector(apiRef);
|
|
35
|
+
+const rowId = apiRef.current.getRowId(rowsLookup[id])
|
|
36
|
+
```
|
|
37
|
+
- The Grid is now more aligned with the WAI-ARIA authoring practices and sets the `role` attribute to `treegrid` if the Data Grid is used with row grouping feature.
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid@8.0.0-alpha.3`
|
|
40
|
+
|
|
41
|
+
- [DataGrid] Fix deselection not working with `isRowSelectable` (#15692) @MBilalShafi
|
|
42
|
+
- [DataGrid] Make column autosizing work with flex columns (#15465) @cherniavskii
|
|
43
|
+
- [DataGrid] Remove `gridRowsDataRowIdToIdLookupSelector` selector (#15698) @arminmeh
|
|
44
|
+
- [DataGrid] Remove `rowPositionsDebounceMs` prop (#15482) @k-rajat19
|
|
45
|
+
- [l10n] Improve Hebrew (he-IL) locale (#15699) @perezShaked
|
|
46
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15734) @ihsanberkozcan
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.3`, plus:
|
|
51
|
+
|
|
52
|
+
- [DataGridPro] Cleanup pinned rows on removal (#15697) @cherniavskii
|
|
53
|
+
- [DataGridPro] Server-side lazy loading (#13878) @arminmeh
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.3`, plus:
|
|
58
|
+
|
|
59
|
+
- [DataGridPremium] Remove the `ariaV8` experimental flag (#15694) @arminmeh
|
|
60
|
+
|
|
61
|
+
### Date and Time Pickers
|
|
62
|
+
|
|
63
|
+
#### Breaking changes
|
|
64
|
+
|
|
65
|
+
- The `onOpen()` and `onClose()` methods of the `usePickerContext()` hook have been replaced with a single `setOpen` method — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usepickercontext).
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.3`
|
|
68
|
+
|
|
69
|
+
- [pickers] Replace the `onOpen()` and `onClose()` methods of `usePickerContext()` with a single `setOpen()` method. (#15701) @flaviendelangle
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.3`.
|
|
74
|
+
|
|
75
|
+
### Charts
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-charts@8.0.0-alpha.3`
|
|
78
|
+
|
|
79
|
+
- [charts] Improve SVG `pattern` and `gradient` support (#15720) @JCQuintas
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.3`.
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.0.0-alpha.3`
|
|
88
|
+
|
|
89
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.2`.
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.3`.
|
|
94
|
+
|
|
95
|
+
### Docs
|
|
96
|
+
|
|
97
|
+
- [docs] Add a customization demo for the Date and Time Pickers overview page (#15118) @noraleonte
|
|
98
|
+
- [docs] Fix typo in charts axis documentation (#15743) @JCQuintas
|
|
99
|
+
- [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15316) @flaviendelangle
|
|
104
|
+
- [code-infra] Lock file maintenance (#11894)
|
|
105
|
+
- [code-infra] Check if `preset-safe` folder exists in codemod test (#15703) @JCQuintas
|
|
106
|
+
- [code-infra] Import Pickers `preset-safe` into global codemod config (#15659) @JCQuintas
|
|
107
|
+
- [code-infra] Playwright 1.49 (#15493) @JCQuintas
|
|
108
|
+
- [test] Force hover in headless Chrome (#15710) @cherniavskii
|
|
109
|
+
|
|
110
|
+
## v8.0.0-alpha.2
|
|
111
|
+
|
|
112
|
+
_Nov 29, 2024_
|
|
113
|
+
|
|
114
|
+
We'd like to offer a big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
115
|
+
|
|
116
|
+
- 👨🏽💻 Improve resize performance on the Data Gird.
|
|
117
|
+
- `<ChartDataProvider />` and `<ChartsSurface />` components are now fully divided — [Learn more](https://next.mui.com/x/react-charts/composition/#overview).
|
|
118
|
+
- Users can create their own HTML components using chart data — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
|
|
119
|
+
- 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
|
|
120
|
+
- 🌍 Improve Dutch locale on the Date and Time Pickers components.
|
|
121
|
+
- 🐞 Bugfixes
|
|
122
|
+
- 📚 Documentation improvements
|
|
123
|
+
|
|
124
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
125
|
+
@dloeda, @headironc, @jedesroches, @k-rajat19, @lauri865, @mathzdev, @nphmuller, @zinoroman.
|
|
126
|
+
Following are all team members who have contributed to this release:
|
|
127
|
+
@arminmeh, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @oliviertassinari.
|
|
128
|
+
|
|
129
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
130
|
+
|
|
131
|
+
### Data Grid
|
|
132
|
+
|
|
133
|
+
#### Breaking changes
|
|
134
|
+
|
|
135
|
+
- The `<GridOverlays />` component is not exported anymore.
|
|
136
|
+
- The `indeterminateCheckboxAction` prop has been removed. Clicking on an indeterminate checkbox "selects" the unselected descendants.
|
|
137
|
+
- The `apiRef.current.resize()` method was removed.
|
|
138
|
+
- 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.
|
|
139
|
+
To revert to the previous behavior, pass `rowSelectionPropagation` as `{ parents: false, descendants: false }`.
|
|
140
|
+
- 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).
|
|
141
|
+
|
|
142
|
+
#### `@mui/x-data-grid@v8.0.0-alpha.2`
|
|
143
|
+
|
|
144
|
+
- [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15634) @jedesroches
|
|
145
|
+
- [DataGrid] Clear timers on unmount (#15620) @cherniavskii
|
|
146
|
+
- [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
|
|
147
|
+
- [DataGrid] Improve resize performance (#15549) @lauri865
|
|
148
|
+
- [DataGrid] Make estimation label more accurate (#15632) @arminmeh
|
|
149
|
+
- [DataGrid] Remove `<GridOverlays />` export (#15573) @k-rajat19
|
|
150
|
+
- [DataGrid] Remove `indeterminateCheckboxAction` prop (#15522) @MBilalShafi
|
|
151
|
+
- [DataGrid] Remove try/catch from `<GridCell />` due to performance issues (#15616) @lauri865
|
|
152
|
+
- [DataGrid] Remove unused `resize` method (#15599) @cherniavskii
|
|
153
|
+
- [DataGrid] Support column virtualization with dynamic row height (#15541) @cherniavskii
|
|
154
|
+
- [DataGrid] Update the default value for `rowSelectionPropagation` (#15523) @MBilalShafi
|
|
155
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
|
|
156
|
+
- [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-data-grid-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
159
|
+
|
|
160
|
+
Same changes as in `@mui/x-data-grid@v8.0.0-alpha.2`, plus:
|
|
161
|
+
|
|
162
|
+
- [DataGridPro] Fix header filtering with `boolean` column type (#15528) @k-rajat19
|
|
163
|
+
- [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15622) @zinoroman
|
|
164
|
+
- [DataGridPro] Fix selection propagation issue on initialization (#15461) @MBilalShafi
|
|
165
|
+
|
|
166
|
+
#### `@mui/x-data-grid-premium@v8.0.0-alpha.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
167
|
+
|
|
168
|
+
Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.2`.
|
|
169
|
+
|
|
170
|
+
### Date and Time Pickers
|
|
171
|
+
|
|
172
|
+
#### Breaking changes
|
|
173
|
+
|
|
174
|
+
- 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).
|
|
175
|
+
|
|
176
|
+
- 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).
|
|
177
|
+
|
|
178
|
+
#### `@mui/x-date-pickers@v8.0.0-alpha.2`
|
|
179
|
+
|
|
180
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
|
|
181
|
+
- [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15552) @flaviendelangle
|
|
182
|
+
- [pickers] Improve validation internals (#15419) @flaviendelangle
|
|
183
|
+
- [pickers] Remove `TSection` and strictly type `TValue` (#15434) @flaviendelangle
|
|
184
|
+
- [pickers] Remove `orientation`, `isLandscape`, `isRtl`, `wrapperVariant` and `disabled` props from `PickersLayout` (#15494) @flaviendelangle
|
|
185
|
+
- [pickers] Use the new `ownerState` in `<PickersCalendarHeader />`, `<PickersArrowSwitcher />` and `<DayCalendarSkeleton />` (#15499) @flaviendelangle
|
|
186
|
+
- [pickers] Use the new `ownerState` object in all the field components (#15510) @flaviendelangle
|
|
187
|
+
|
|
188
|
+
#### `@mui/x-date-pickers-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
189
|
+
|
|
190
|
+
Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.2`.
|
|
191
|
+
|
|
192
|
+
### Charts
|
|
193
|
+
|
|
194
|
+
#### Breaking changes
|
|
195
|
+
|
|
196
|
+
- Charts Container don't have a `<div />` wrapping them anymore. All props are now passed to the root `<svg />` instead of the `<div />`.
|
|
197
|
+
|
|
198
|
+
#### `@mui/x-charts@v8.0.0-alpha.2`
|
|
199
|
+
|
|
200
|
+
- [charts] Allow the creation of custom HTML components using charts data (#15511) @JCQuintas
|
|
201
|
+
- [charts] Flatten imports from `@mui/utils` and `@mui/system` (#15603) @alexfauquette
|
|
202
|
+
- [charts] Introduce the plugin system (#15513) @alexfauquette
|
|
203
|
+
- [charts] Prevent invalid `releasePointerCapture` (#15602) @alexfauquette
|
|
204
|
+
- [charts] Fix custom Tooltip demos (#15631) @alexfauquette
|
|
205
|
+
|
|
206
|
+
#### `@mui/x-charts-pro@v8.0.0-alpha.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
207
|
+
|
|
208
|
+
Same changes as in `@mui/x-charts@v8.0.0-alpha.2`.
|
|
209
|
+
|
|
210
|
+
### Tree View
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-tree-view@v8.0.0-alpha.2`
|
|
213
|
+
|
|
214
|
+
- [TreeView] Flatten import from `@mui/utils` and `@mui/system` (#15604) @alexfauquette
|
|
215
|
+
|
|
216
|
+
#### `@mui/x-tree-view-pro@v8.0.0-alpha.2`
|
|
217
|
+
|
|
218
|
+
Same changes as in `@mui/x-tree-view@v8.0.0-alpha.2`.
|
|
219
|
+
|
|
220
|
+
### Docs
|
|
221
|
+
|
|
222
|
+
- [docs] Fix 404 links (#15575) @oliviertassinari
|
|
223
|
+
- [docs] Fix bash comments (#15571) @oliviertassinari
|
|
224
|
+
- [docs] Fix Pickers theme augmentation example (#15672) @LukasTy
|
|
225
|
+
- [docs] Replace use of "e.g." with "for example" (#15572) @oliviertassinari
|
|
226
|
+
- [docs] Update stale `new` and `preview` tags in v8 docs (#15547) @JCQuintas
|
|
227
|
+
- [docs] Fix layout shift image on Tree View docs (#15626) @oliviertassinari
|
|
228
|
+
- [docs] Fix `anchorEl` API page for charts (#15625) @oliviertassinari
|
|
229
|
+
- [docs] Add documentation for the list view feature (#15344) @KenanYusuf
|
|
230
|
+
|
|
231
|
+
### Core
|
|
232
|
+
|
|
233
|
+
- [core] Follow `()` function convention for docs @oliviertassinari
|
|
234
|
+
- [core] Remove dead translation key (#15566) @oliviertassinari
|
|
235
|
+
- [code-infra] Auto-merge `@types/node` bumps (#15591) @LukasTy
|
|
236
|
+
|
|
8
237
|
## v8.0.0-alpha.1
|
|
9
238
|
|
|
10
239
|
_Nov 22, 2024_
|
|
@@ -17,8 +246,6 @@ We'd like to offer a big thanks to the 16 contributors who made this release pos
|
|
|
17
246
|
- 🐞 Bugfixes
|
|
18
247
|
- 📚 Documentation improvements
|
|
19
248
|
|
|
20
|
-
### Breaking change
|
|
21
|
-
|
|
22
249
|
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
250
|
@CarlosLopezLg, @headironc, @hendrikpeilke, @k-rajat19, @lhilgert9, @viktormelin.
|
|
24
251
|
Following are all team members who have contributed to this release:
|
|
@@ -56,7 +283,7 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
|
|
|
56
283
|
#### Breaking change
|
|
57
284
|
|
|
58
285
|
- 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
|
|
286
|
+
- 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
287
|
|
|
61
288
|
#### `@mui/x-date-pickers@v8.0.0-alpha.1`
|
|
62
289
|
|
|
@@ -64,9 +291,9 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
|
|
|
64
291
|
- [pickers] React 19 support (#15342) @arminmeh
|
|
65
292
|
- [pickers] Add new properties to `PickerOwnerState` and `PickerContextValue` (#15415) @flaviendelangle
|
|
66
293
|
- [pickers] Always use `props.value` when it changes (#15490) @flaviendelangle
|
|
67
|
-
- [pickers] Ensure internal value timezone is updated
|
|
294
|
+
- [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
|
|
68
295
|
- [pickers] Fix unused code in `<PickersToolbar />` component (#15515) @LukasTy
|
|
69
|
-
- [pickers] Remove
|
|
296
|
+
- [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
|
|
70
297
|
- [pickers] Remove the form props from the layout and the toolbar slots (#15492) @flaviendelangle
|
|
71
298
|
- [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15532) @flaviendelangle
|
|
72
299
|
- [TimePicker] Prevent mouse events after `touchend` event (#15346) @arthurbalduini
|
|
@@ -82,12 +309,14 @@ Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
|
|
|
82
309
|
#### Breaking change
|
|
83
310
|
|
|
84
311
|
- The DX of the Tooltip customization has been refactored
|
|
312
|
+
|
|
85
313
|
- The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
|
|
86
|
-
- The `popper`, `axisContent`,
|
|
314
|
+
- The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
|
|
87
315
|
- 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
316
|
- To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
|
|
89
317
|
|
|
90
318
|
- The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
|
|
319
|
+
|
|
91
320
|
- This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
|
|
92
321
|
If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
|
|
93
322
|
- The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
|
|
@@ -338,6 +567,100 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
|
|
|
338
567
|
- [release] v8 preparation (#15054) @michelengelen
|
|
339
568
|
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
|
|
340
569
|
|
|
570
|
+
## 7.23.0
|
|
571
|
+
|
|
572
|
+
_Nov 29, 2024_
|
|
573
|
+
|
|
574
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
575
|
+
|
|
576
|
+
- ✨ 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.
|
|
577
|
+
|
|
578
|
+
https://github.com/user-attachments/assets/61286adc-03fc-4323-9739-8ca726fcc16c
|
|
579
|
+
|
|
580
|
+
- ⚛️ React 19 support
|
|
581
|
+
- 📚 Documentation improvements
|
|
582
|
+
- 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
|
|
583
|
+
- 🌍 Improve Dutch locale on the Date and Time Picker components.
|
|
584
|
+
- 🐞 Bugfixes
|
|
585
|
+
|
|
586
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
587
|
+
@dloeda, @headironc, @mathzdev, @nphmuller, @lhilgert9, @lauri865.
|
|
588
|
+
Following are all team members who have contributed to this release:
|
|
589
|
+
@oliviertassinari, @arminmeh, @KenanYusuf, @flaviendelangle, @MBilalShafi.
|
|
590
|
+
|
|
591
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
592
|
+
|
|
593
|
+
### Data Grid
|
|
594
|
+
|
|
595
|
+
#### `@mui/x-data-grid@v7.23.0`
|
|
596
|
+
|
|
597
|
+
- [DataGrid] React 19 support (#15557) @arminmeh
|
|
598
|
+
- [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15642) @jedesroches
|
|
599
|
+
- [DataGrid] Fix last separator not being hidden when grid is scrollable (#15551) @KenanYusuf
|
|
600
|
+
- [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
|
|
601
|
+
- [DataGrid] Fix row-spanning in combination with column-pinning (#15460) @lhilgert9
|
|
602
|
+
- [DataGrid] Improve resize performance (#15592) @lauri865
|
|
603
|
+
- [DataGrid] Support column virtualization with dynamic row height (#15567) @cherniavskii
|
|
604
|
+
- [DataGrid] Improve `GridCell` performance (#15621) @lauri865
|
|
605
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
|
|
606
|
+
- [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
|
|
607
|
+
|
|
608
|
+
#### `@mui/x-data-grid-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
609
|
+
|
|
610
|
+
Same changes as in `@mui/x-data-grid@v7.23.0`, plus:
|
|
611
|
+
|
|
612
|
+
- [DataGridPro] Fix header filtering with `boolean` column type (#15640) @k-rajat19
|
|
613
|
+
- [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15643) @zinoroman
|
|
614
|
+
- [DataGridPro] Fix selection propagation issue on initialization (#15593) @MBilalShafi
|
|
615
|
+
|
|
616
|
+
#### `@mui/x-data-grid-premium@v7.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
617
|
+
|
|
618
|
+
Same changes as in `@mui/x-data-grid-pro@v7.23.0`.
|
|
619
|
+
|
|
620
|
+
### Date and Time Pickers
|
|
621
|
+
|
|
622
|
+
#### `@mui/x-date-pickers@v7.23.0`
|
|
623
|
+
|
|
624
|
+
- [pickers] React 19 support (#15557) @arminmeh
|
|
625
|
+
- [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15653) @flaviendelangle
|
|
626
|
+
- [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15544) @flaviendelangle
|
|
627
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
|
|
628
|
+
|
|
629
|
+
#### `@mui/x-date-pickers-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
630
|
+
|
|
631
|
+
Same changes as in `@mui/x-date-pickers@v7.23.0`.
|
|
632
|
+
|
|
633
|
+
### Charts
|
|
634
|
+
|
|
635
|
+
#### `@mui/x-charts@v7.23.0`
|
|
636
|
+
|
|
637
|
+
- [charts] React 19 support (#15557) @arminmeh
|
|
638
|
+
- [charts] Prevent invalid `releasePointerCapture` (#15609) @alexfauquette
|
|
639
|
+
|
|
640
|
+
#### `@mui/x-charts-pro@v7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
641
|
+
|
|
642
|
+
Same changes as in `@mui/x-charts@v7.23.0`.
|
|
643
|
+
|
|
644
|
+
### Tree View
|
|
645
|
+
|
|
646
|
+
#### `@mui/x-tree-view@v7.23.0`
|
|
647
|
+
|
|
648
|
+
- [TreeView] React 19 support (#15557) @arminmeh
|
|
649
|
+
|
|
650
|
+
#### `@mui/x-tree-view-pro@7.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
651
|
+
|
|
652
|
+
Same changes as in `@mui/x-tree-view@7.23.0`.
|
|
653
|
+
|
|
654
|
+
### Docs
|
|
655
|
+
|
|
656
|
+
- [docs] Add data caching to lazy loaded detail panel demo (#15555) @cherniavskii
|
|
657
|
+
- [docs] Remove selectors section from list view docs (#15639) @KenanYusuf
|
|
658
|
+
- [docs] Add documentation for the list view feature (#15344) @KenanYusuf
|
|
659
|
+
|
|
660
|
+
### Core
|
|
661
|
+
|
|
662
|
+
- [core] Update @mui/monorepo (#15574) @oliviertassinari
|
|
663
|
+
|
|
341
664
|
## v7.22.3
|
|
342
665
|
|
|
343
666
|
_Nov 21, 2024_
|
|
@@ -4803,7 +5126,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
|
4803
5126
|
|
|
4804
5127
|
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
5128
|
|
|
4806
|
-
You should now be able to directly pass the returned value from your field hook (
|
|
5129
|
+
You should now be able to directly pass the returned value from your field hook (for example `useDateField`) to `useClearableField`
|
|
4807
5130
|
|
|
4808
5131
|
```diff
|
|
4809
5132
|
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.
|
|
@@ -690,14 +682,6 @@ DataGridRaw.propTypes = {
|
|
|
690
682
|
* Controls the modes of the rows.
|
|
691
683
|
*/
|
|
692
684
|
rowModesModel: PropTypes.object,
|
|
693
|
-
/**
|
|
694
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
695
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
696
|
-
* but might reduce performance when displaying a large number of rows.
|
|
697
|
-
* @default 166
|
|
698
|
-
* @deprecated
|
|
699
|
-
*/
|
|
700
|
-
rowPositionsDebounceMs: PropTypes.number,
|
|
701
685
|
/**
|
|
702
686
|
* Set of rows of type [[GridRowsProp]].
|
|
703
687
|
* @default []
|
|
@@ -766,5 +750,13 @@ DataGridRaw.propTypes = {
|
|
|
766
750
|
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
767
751
|
* @default false
|
|
768
752
|
*/
|
|
769
|
-
unstable_rowSpanning: PropTypes.bool
|
|
753
|
+
unstable_rowSpanning: PropTypes.bool,
|
|
754
|
+
/**
|
|
755
|
+
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
756
|
+
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
757
|
+
* For datasets with a large number of columns, this can cause performance issues.
|
|
758
|
+
* 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.
|
|
759
|
+
* @default false
|
|
760
|
+
*/
|
|
761
|
+
virtualizeColumnsWithAutoRowHeight: PropTypes.bool
|
|
770
762
|
};
|
|
@@ -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: {
|
|
@@ -56,10 +56,13 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
56
56
|
// Convert to an object to make O(1) checking if a row exists or not
|
|
57
57
|
// TODO create selector that returns visibleRowIds/paginatedVisibleRowIds as an object
|
|
58
58
|
return rowIds.reduce((acc, id) => {
|
|
59
|
+
if (!apiRef.current.isRowSelectable(id)) {
|
|
60
|
+
return acc;
|
|
61
|
+
}
|
|
59
62
|
acc[id] = true;
|
|
60
63
|
return acc;
|
|
61
64
|
}, {});
|
|
62
|
-
}, [rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
|
|
65
|
+
}, [apiRef, rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
|
|
63
66
|
|
|
64
67
|
// Amount of rows selected and that are visible in the current page
|
|
65
68
|
const currentSelectionSize = React.useMemo(() => filteredSelection.filter(id => selectionCandidates[id]).length, [filteredSelection, selectionCandidates]);
|
|
@@ -92,12 +95,11 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
92
95
|
React.useEffect(() => {
|
|
93
96
|
return apiRef.current.subscribeEvent('rowSelectionChange', handleSelectionChange);
|
|
94
97
|
}, [apiRef, handleSelectionChange]);
|
|
95
|
-
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
96
|
-
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
98
|
+
const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
97
99
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
98
100
|
ref: ref,
|
|
99
101
|
indeterminate: isIndeterminate,
|
|
100
|
-
checked:
|
|
102
|
+
checked: isChecked && !isIndeterminate,
|
|
101
103
|
onChange: handleChange,
|
|
102
104
|
className: classes.root,
|
|
103
105
|
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, {
|