@mui/x-data-grid 7.11.1 → 7.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +178 -4
- package/components/GridHeaders.js +1 -4
- package/components/GridPagination.js +2 -0
- package/components/GridRow.d.ts +1 -0
- package/components/GridRow.js +11 -28
- package/components/GridRowCount.js +1 -1
- package/components/GridSelectedRowCount.js +1 -1
- package/components/base/GridOverlays.js +1 -1
- package/components/cell/GridBooleanCell.js +3 -3
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/containers/GridFooterContainer.js +1 -1
- package/components/containers/GridOverlay.js +1 -1
- package/components/containers/GridRoot.js +4 -7
- package/components/containers/GridRootStyles.js +26 -6
- package/components/containers/GridToolbarContainer.js +1 -1
- package/components/panel/GridPanelContent.js +1 -1
- package/components/panel/GridPanelFooter.js +1 -1
- package/components/panel/GridPanelHeader.js +1 -1
- package/components/panel/GridPanelWrapper.js +1 -1
- package/components/virtualization/GridBottomContainer.js +1 -1
- package/components/virtualization/GridTopContainer.js +2 -13
- package/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/components/virtualization/GridVirtualScroller.js +1 -1
- package/components/virtualization/GridVirtualScrollerContent.js +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +1 -1
- package/constants/gridClasses.d.ts +10 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/useGridRefs.js +3 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/hooks/features/editing/useGridEditing.js +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +3 -2
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.js +3 -3
- package/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/index.js +1 -1
- package/internals/utils/useProps.js +1 -6
- package/locales/trTR.js +19 -21
- package/models/api/gridCoreApi.d.ts +1 -1
- package/modern/components/GridHeaders.js +1 -4
- package/modern/components/GridPagination.js +2 -0
- package/modern/components/GridRow.js +11 -28
- package/modern/components/GridRowCount.js +1 -1
- package/modern/components/GridSelectedRowCount.js +1 -1
- package/modern/components/base/GridOverlays.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +3 -3
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -1
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/modern/components/columnHeaders/GridIconButtonContainer.js +1 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/modern/components/containers/GridFooterContainer.js +1 -1
- package/modern/components/containers/GridOverlay.js +1 -1
- package/modern/components/containers/GridRoot.js +4 -7
- package/modern/components/containers/GridRootStyles.js +26 -6
- package/modern/components/containers/GridToolbarContainer.js +1 -1
- package/modern/components/panel/GridPanelContent.js +1 -1
- package/modern/components/panel/GridPanelFooter.js +1 -1
- package/modern/components/panel/GridPanelHeader.js +1 -1
- package/modern/components/panel/GridPanelWrapper.js +1 -1
- package/modern/components/virtualization/GridBottomContainer.js +1 -1
- package/modern/components/virtualization/GridTopContainer.js +2 -13
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/modern/components/virtualization/GridVirtualScroller.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollerContent.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +1 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/useGridRefs.js +3 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/modern/hooks/features/editing/useGridEditing.js +2 -2
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/modern/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +3 -2
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +3 -3
- package/modern/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/modern/index.js +1 -1
- package/modern/internals/utils/useProps.js +1 -6
- package/modern/locales/trTR.js +19 -21
- package/modern/utils/composeGridClasses.js +5 -0
- package/modern/utils/platform.js +2 -0
- package/node/components/GridHeaders.js +1 -4
- package/node/components/GridPagination.js +2 -0
- package/node/components/GridRow.js +9 -26
- package/node/components/GridRowCount.js +2 -2
- package/node/components/GridSelectedRowCount.js +2 -2
- package/node/components/base/GridOverlays.js +2 -2
- package/node/components/cell/GridBooleanCell.js +3 -3
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +2 -2
- package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +2 -2
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +2 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +2 -2
- package/node/components/columnSelection/GridHeaderCheckbox.js +4 -4
- package/node/components/columnsManagement/GridColumnsManagement.js +5 -5
- package/node/components/containers/GridFooterContainer.js +2 -2
- package/node/components/containers/GridOverlay.js +2 -2
- package/node/components/containers/GridRoot.js +4 -7
- package/node/components/containers/GridRootStyles.js +26 -6
- package/node/components/containers/GridToolbarContainer.js +2 -2
- package/node/components/panel/GridPanelContent.js +2 -2
- package/node/components/panel/GridPanelFooter.js +2 -2
- package/node/components/panel/GridPanelHeader.js +2 -2
- package/node/components/panel/GridPanelWrapper.js +2 -2
- package/node/components/virtualization/GridBottomContainer.js +2 -2
- package/node/components/virtualization/GridTopContainer.js +3 -14
- package/node/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/node/components/virtualization/GridVirtualScroller.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerContent.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -2
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/core/useGridRefs.js +3 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -0
- package/node/hooks/features/editing/useGridEditing.js +1 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/node/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +2 -2
- package/node/hooks/features/rows/gridRowsUtils.js +6 -4
- package/node/hooks/features/rows/index.js +8 -1
- package/node/hooks/features/rows/useGridRows.js +2 -2
- package/node/hooks/features/sorting/gridSortingSelector.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +13 -5
- package/node/index.js +1 -1
- package/node/internals/utils/useProps.js +1 -7
- package/node/locales/trTR.js +19 -21
- package/node/utils/composeGridClasses.js +11 -0
- package/node/utils/platform.js +8 -0
- package/package.json +13 -3
- package/utils/composeGridClasses.d.ts +3 -0
- package/utils/composeGridClasses.js +5 -0
- package/utils/platform.d.ts +1 -0
- package/utils/platform.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,180 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.12.1
|
|
7
|
+
|
|
8
|
+
_Aug 8, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Charts get a new component to display color mapping in the legend
|
|
13
|
+
- 🚀 The `@mui/x-charts-pro` is released in alpha version 🧪. This new package introduces two main features:
|
|
14
|
+
- The Heatmap component
|
|
15
|
+
- The zoom interaction on the bar, line, and scatter charts
|
|
16
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Date and Time Pickers
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
|
|
19
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
20
|
+
|
|
21
|
+
### Data Grid
|
|
22
|
+
|
|
23
|
+
#### `@mui/x-data-grid@7.12.1`
|
|
24
|
+
|
|
25
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` behavior with server-side pagination (#14083) @MBilalShafi
|
|
26
|
+
- [DataGrid] Fix `columnHeadersContainerRef` being `undefined` before mount (#14051) @samwato
|
|
27
|
+
- [DataGrid] Support Yarn PnP (#14126) @cherniavskii
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid@7.12.1`.
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-premium@7.12.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.1`.
|
|
36
|
+
|
|
37
|
+
### Date and Time Pickers
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers@7.12.1`
|
|
40
|
+
|
|
41
|
+
- [l10n] Improve Dutch (nlNL) locale (pickers) (#14036) @Robin1896
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
44
|
+
|
|
45
|
+
Same changes as in `@mui/x-date-pickers@7.12.1`.
|
|
46
|
+
|
|
47
|
+
### Charts
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-charts@7.12.1`
|
|
50
|
+
|
|
51
|
+
- [charts] Fix charts vendor publish config (#14073) @JCQuintas
|
|
52
|
+
- [charts] Move `plugins` to `PluginProvider` (#14056) @JCQuintas
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-charts-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-charts@7.12.1`, plus:
|
|
57
|
+
|
|
58
|
+
- [charts-pro] Release the pro package in alpha (#13859) @alexfauquette
|
|
59
|
+
|
|
60
|
+
### Tree View
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-tree-view@7.12.1`
|
|
63
|
+
|
|
64
|
+
### Docs
|
|
65
|
+
|
|
66
|
+
- [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
|
|
67
|
+
- [docs] Disable ad in `Rich Tree View-Ordering` page (#14123) @oliviertassinari
|
|
68
|
+
- [docs] Redesign Date and Time Pickers overview page (#13241) @noraleonte
|
|
69
|
+
|
|
70
|
+
- [CHANGELOG] Polish details @oliviertassinari
|
|
71
|
+
- [code-infra] Use concurrency 1 in CircleCI (#14110) @JCQuintas
|
|
72
|
+
- [infra] Re-added the removal of `Latest Version` section (#14132) @michelengelen
|
|
73
|
+
|
|
74
|
+
## 7.12.0
|
|
75
|
+
|
|
76
|
+
_Aug 1, 2024_
|
|
77
|
+
|
|
78
|
+
### 💵 Our commercial offering is evolving
|
|
79
|
+
|
|
80
|
+
The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving two new packages:
|
|
81
|
+
|
|
82
|
+
- `@mui/x-tree-view-pro` (available today!)
|
|
83
|
+
- `@mui/x-charts-pro` (available in the coming weeks)
|
|
84
|
+
|
|
85
|
+
As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
|
|
86
|
+
|
|
87
|
+
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
|
|
88
|
+
|
|
89
|
+
### Highlights
|
|
90
|
+
|
|
91
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
92
|
+
|
|
93
|
+
- 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
|
|
94
|
+
|
|
95
|
+
<img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
96
|
+
|
|
97
|
+
- 📦 Support CommonJS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
98
|
+
|
|
99
|
+
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
100
|
+
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
- The solution up until now was to export charts with only ESM. But some frameworks are confused by this configuration.
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
- So in order to fix this, we are providing a CJS version of D3.
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
- 🌍 Improve Turkish (tr-TR) locale on the Data Grid
|
|
113
|
+
- 🌍 Improve Finnish (fi-FI) locale on the Date and Time Pickers
|
|
114
|
+
- 🐞 Bugfixes
|
|
115
|
+
- 📚 Documentation improvements
|
|
116
|
+
|
|
117
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
118
|
+
|
|
119
|
+
### Data Grid
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-data-grid@7.12.0`
|
|
122
|
+
|
|
123
|
+
- [DataGrid] Fix crash when updating columns immediately after scrolling (#13781) @cherniavskii
|
|
124
|
+
- [DataGrid] Fix `role=presentation` a11y issue (#13891) @romgrk
|
|
125
|
+
- [DataGrid] Fix top corner pixels & outline radius (#13943) @romgrk
|
|
126
|
+
- [DataGrid] Refactor: remove useless copy (#14039) @romgrk
|
|
127
|
+
- [l10n] Improve Turkish (tr-TR) locale (#13996) @bagcivan
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-data-grid-pro@7.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-data-grid@7.12.0`.
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-data-grid-premium@7.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
134
|
+
|
|
135
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.0`.
|
|
136
|
+
|
|
137
|
+
### Date and Time Pickers
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-date-pickers@7.12.0`
|
|
140
|
+
|
|
141
|
+
- [l10n] Improve Finnish (fi-FI) locale (#14054) @frozenzia
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-date-pickers-pro@7.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-date-pickers@7.12.0`.
|
|
146
|
+
|
|
147
|
+
### Charts
|
|
148
|
+
|
|
149
|
+
#### `@mui/x-charts@7.12.0`
|
|
150
|
+
|
|
151
|
+
- [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
|
|
152
|
+
- [charts] Use vendor to have Common JS bundle working out of the box (#13608) @alexfauquette
|
|
153
|
+
- [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
|
|
154
|
+
|
|
155
|
+
### Tree View
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-tree-view@7.12.0`
|
|
158
|
+
|
|
159
|
+
- [TreeView] Add new prop `onItemClick` on the Tree View components (#14018) @flaviendelangle
|
|
160
|
+
- [TreeView] Add new utility function `isEventTargetInDescendants` (#13982) @flaviendelangle
|
|
161
|
+
- [TreeView] Support item reordering using drag and drop (#12213) @flaviendelangle
|
|
162
|
+
|
|
163
|
+
### Docs
|
|
164
|
+
|
|
165
|
+
- [docs] Add Pickers `minDate` and `maxDate` `default` description (#14024) @LukasTy
|
|
166
|
+
- [docs] Fix 404 (#13989) @alexfauquette
|
|
167
|
+
- [docs] Fix Vale errors (#14025) @oliviertassinari
|
|
168
|
+
- [docs] Update on `renderCell` & autogenerated rows (#13879) @romgrk
|
|
169
|
+
|
|
170
|
+
### Core
|
|
171
|
+
|
|
172
|
+
- [core] Fix event naming convention @oliviertassinari
|
|
173
|
+
- [core] Replace @mui/base with @mui/utils + @mui/material (#13823) @mnajdova
|
|
174
|
+
- [core] Test `charts` performance with codspeed (#13952) @JCQuintas
|
|
175
|
+
- [infra] Consolidate issue cleanup and support labeling action (#14031) @michelengelen
|
|
176
|
+
- [infra] Revert `vale` action `paths` filtering (#14038) @LukasTy
|
|
177
|
+
- [test] Fix adapters code coverage (#13969) @alexfauquette
|
|
178
|
+
- [test] Fix mocha config to run charts tests (#14041) @alexfauquette
|
|
179
|
+
|
|
6
180
|
## 7.11.1
|
|
7
181
|
|
|
8
182
|
_Jul 25, 2024_
|
|
@@ -143,8 +317,8 @@ Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
|
|
|
143
317
|
- [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
|
|
144
318
|
- [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
|
|
145
319
|
- [charts] Generate API documentation for pro components (#13822) @alexfauquette
|
|
146
|
-
- [charts] Improve zoomed highlight
|
|
147
|
-
- [charts] Allow zoom on Y axis and add zoom options to configure zooming
|
|
320
|
+
- [charts] Improve zoomed highlight behavior (unreleased) (#13868) @JCQuintas
|
|
321
|
+
- [charts] Allow zoom on Y axis and add zoom options to configure zooming behavior (unreleased) (#13726) @JCQuintas
|
|
148
322
|
- [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
|
|
149
323
|
|
|
150
324
|
### Tree View
|
|
@@ -617,7 +791,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
|
|
|
617
791
|
|
|
618
792
|
#### `@mui/x-charts@7.6.2`
|
|
619
793
|
|
|
620
|
-
- [charts] Add `Initializable` type and
|
|
794
|
+
- [charts] Add `Initializable` type and behavior to allow checking if a complex context has been initialized. (#13365) @JCQuintas
|
|
621
795
|
- [charts] Fix some props not working in `xAxis` and `yAxis` (#13372) @Valyok26
|
|
622
796
|
- [charts] Harmonize charts types (#13366) @alexfauquette
|
|
623
797
|
- [charts] Introduce plugins system (#13367) @alexfauquette
|
|
@@ -625,7 +799,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
|
|
|
625
799
|
|
|
626
800
|
### Docs
|
|
627
801
|
|
|
628
|
-
- [docs] Add badges like in Material
|
|
802
|
+
- [docs] Add badges like in Material UI @oliviertassinari
|
|
629
803
|
- [docs] Update twitter.com to x.com @oliviertassinari
|
|
630
804
|
- [docs] Fix the description of `tickInterval` (#13355) @alexfauquette
|
|
631
805
|
- [docs] Adjust the code example for `quickFilterValues` (#12919) @michelengelen
|
|
@@ -27,10 +27,7 @@ function GridHeaders() {
|
|
|
27
27
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
28
28
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
29
29
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
30
|
-
const columnsContainerRef =
|
|
31
|
-
apiRef.current.register('private', {
|
|
32
|
-
columnHeadersContainerRef: columnsContainerRef
|
|
33
|
-
});
|
|
30
|
+
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
34
31
|
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
35
32
|
ref: columnsContainerRef,
|
|
36
33
|
visibleColumns: visibleColumns,
|
|
@@ -11,6 +11,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
const GridPaginationRoot = styled(TablePagination)(({
|
|
12
12
|
theme
|
|
13
13
|
}) => ({
|
|
14
|
+
maxHeight: 'calc(100% + 1px)',
|
|
15
|
+
// border width
|
|
14
16
|
[`& .${tablePaginationClasses.selectLabel}`]: {
|
|
15
17
|
display: 'none',
|
|
16
18
|
[theme.breakpoints.up('sm')]: {
|
package/components/GridRow.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
33
33
|
isFirstVisible: boolean;
|
|
34
34
|
isLastVisible: boolean;
|
|
35
35
|
isNotVisible: boolean;
|
|
36
|
+
showBottomBorder: boolean;
|
|
36
37
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
37
38
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
38
39
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
package/components/GridRow.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
3
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "dimensions", "renderContext", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import {
|
|
7
|
+
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
8
|
import { fastMemo } from '../utils/fastMemo';
|
|
9
9
|
import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
|
|
10
10
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
11
|
-
import {
|
|
11
|
+
import { gridClasses } from '../constants/gridClasses';
|
|
12
|
+
import { composeGridClasses } from '../utils/composeGridClasses';
|
|
12
13
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
13
14
|
import { gridColumnPositionsSelector } from '../hooks/features/columns/gridColumnsSelector';
|
|
14
15
|
import { useGridSelector, objectShallowCompare } from '../hooks/utils/useGridSelector';
|
|
@@ -25,21 +26,6 @@ import { PinnedPosition, gridPinnedColumnPositionLookup } from './cell/GridCell'
|
|
|
25
26
|
import { GridScrollbarFillerCell as ScrollbarFiller } from './GridScrollbarFillerCell';
|
|
26
27
|
import { getPinnedCellOffset } from '../internals/utils/getPinnedCellOffset';
|
|
27
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
const useUtilityClasses = ownerState => {
|
|
29
|
-
const {
|
|
30
|
-
editable,
|
|
31
|
-
editing,
|
|
32
|
-
selected,
|
|
33
|
-
isFirstVisible,
|
|
34
|
-
isLastVisible,
|
|
35
|
-
rowHeight,
|
|
36
|
-
classes
|
|
37
|
-
} = ownerState;
|
|
38
|
-
const slots = {
|
|
39
|
-
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
40
|
-
};
|
|
41
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
42
|
-
};
|
|
43
29
|
function EmptyCell({
|
|
44
30
|
width
|
|
45
31
|
}) {
|
|
@@ -72,6 +58,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
72
58
|
isFirstVisible,
|
|
73
59
|
isLastVisible,
|
|
74
60
|
isNotVisible,
|
|
61
|
+
showBottomBorder,
|
|
75
62
|
onClick,
|
|
76
63
|
onDoubleClick,
|
|
77
64
|
onMouseEnter,
|
|
@@ -93,21 +80,16 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
93
80
|
const rowNode = apiRef.current.getRowNode(rowId);
|
|
94
81
|
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
95
82
|
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
83
|
+
const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
|
|
84
|
+
const editable = rootProps.editMode === GridEditModes.Row;
|
|
96
85
|
const hasFocusCell = focusedColumnIndex !== undefined;
|
|
97
86
|
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
|
|
98
87
|
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
|
|
99
88
|
const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
|
|
100
89
|
|
|
101
|
-
const
|
|
102
|
-
selected,
|
|
103
|
-
|
|
104
|
-
isLastVisible,
|
|
105
|
-
classes: rootProps.classes,
|
|
106
|
-
editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit,
|
|
107
|
-
editable: rootProps.editMode === GridEditModes.Row,
|
|
108
|
-
rowHeight
|
|
109
|
-
};
|
|
110
|
-
const classes = useUtilityClasses(ownerState);
|
|
90
|
+
const classes = composeGridClasses(rootProps.classes, {
|
|
91
|
+
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
92
|
+
});
|
|
111
93
|
React.useLayoutEffect(() => {
|
|
112
94
|
if (currentPage.range) {
|
|
113
95
|
// The index prop is relative to the rows from all pages. As example, the index prop of the
|
|
@@ -417,6 +399,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
417
399
|
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
|
|
418
400
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
419
401
|
selected: PropTypes.bool.isRequired,
|
|
402
|
+
showBottomBorder: PropTypes.bool.isRequired,
|
|
420
403
|
/**
|
|
421
404
|
* Determines which cell should be tabbable by having tabIndex=0.
|
|
422
405
|
* If `null`, no cell in this row is in the tab sequence.
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "rowCount", "visibleRowCount"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
10
10
|
import { getDataGridUtilityClass } from '../constants/gridClasses';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "selectedRowCount"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
10
10
|
import { getDataGridUtilityClass } from '../constants/gridClasses';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
8
8
|
import { gridDimensionsSelector } from '../../hooks/features/dimensions';
|
|
@@ -3,11 +3,11 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex", "hideDescendantCount"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
10
|
-
import {
|
|
10
|
+
import { isAutogeneratedRowNode } from '../../hooks/features/rows/gridRowsUtils';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
|
@@ -106,7 +106,7 @@ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
|
|
|
106
106
|
const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
|
|
107
107
|
export { GridBooleanCell };
|
|
108
108
|
export const renderBooleanCell = params => {
|
|
109
|
-
if (params.field !== '__row_group_by_columns_group__' &&
|
|
109
|
+
if (params.field !== '__row_group_by_columns_group__' && isAutogeneratedRowNode(params.rowNode)) {
|
|
110
110
|
return '';
|
|
111
111
|
}
|
|
112
112
|
return /*#__PURE__*/_jsx(GridBooleanCell, _extends({}, params));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
5
5
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
6
6
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
8
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -15,13 +15,14 @@ const useUtilityClasses = ownerState => {
|
|
|
15
15
|
classes,
|
|
16
16
|
headerAlign,
|
|
17
17
|
isDragging,
|
|
18
|
+
isLastColumn,
|
|
18
19
|
showLeftBorder,
|
|
19
20
|
showRightBorder,
|
|
20
21
|
groupId,
|
|
21
22
|
pinnedPosition
|
|
22
23
|
} = ownerState;
|
|
23
24
|
const slots = {
|
|
24
|
-
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight'],
|
|
25
|
+
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight', isLastColumn && 'columnHeader--last'],
|
|
25
26
|
draggableContainer: ['columnHeaderDraggableContainer'],
|
|
26
27
|
titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'],
|
|
27
28
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
const _excluded = ["direction", "index", "sortingOrder", "disabled"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import Badge from '@mui/material/Badge';
|
|
8
8
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { isOverflown } from '../../utils/domUtils';
|
|
10
10
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
8
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["field", "colDef"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { isMultipleRowSelectionEnabled } from '../../hooks/features/rowSelection/utils';
|
|
8
8
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
9
9
|
import { gridTabIndexColumnHeaderSelector } from '../../hooks/features/focus/gridFocusStateSelector';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
8
|
import { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from '../../hooks/features/columns/gridColumnsSelector';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -12,15 +12,14 @@ import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
|
12
12
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
13
13
|
import { gridDensitySelector } from '../../hooks/features/density/densitySelector';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const useUtilityClasses = ownerState => {
|
|
15
|
+
const useUtilityClasses = (ownerState, density) => {
|
|
16
16
|
const {
|
|
17
17
|
autoHeight,
|
|
18
|
-
density,
|
|
19
18
|
classes,
|
|
20
19
|
showCellVerticalBorder
|
|
21
20
|
} = ownerState;
|
|
22
21
|
const slots = {
|
|
23
|
-
root: ['root', autoHeight && 'autoHeight', `root--density${capitalize(density)}`, 'withBorderColor', showCellVerticalBorder && 'withVerticalBorder']
|
|
22
|
+
root: ['root', autoHeight && 'autoHeight', `root--density${capitalize(density)}`, ownerState.slots.toolbar === null && 'root--noToolbar', 'withBorderColor', showCellVerticalBorder && 'withVerticalBorder']
|
|
24
23
|
};
|
|
25
24
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
26
25
|
};
|
|
@@ -34,10 +33,8 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
|
34
33
|
const density = useGridSelector(apiRef, gridDensitySelector);
|
|
35
34
|
const rootElementRef = apiRef.current.rootElementRef;
|
|
36
35
|
const handleRef = useForkRef(rootElementRef, ref);
|
|
37
|
-
const ownerState =
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
const classes = useUtilityClasses(ownerState);
|
|
36
|
+
const ownerState = rootProps;
|
|
37
|
+
const classes = useUtilityClasses(ownerState, density);
|
|
41
38
|
|
|
42
39
|
// Our implementation of <NoSsr />
|
|
43
40
|
const [mountedState, setMountedState] = React.useState(false);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { alpha, styled, darken, lighten, decomposeColor, recomposeColor } from '@mui/material/styles';
|
|
3
3
|
import { gridClasses as c } from '../../constants/gridClasses';
|
|
4
|
+
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
5
|
+
import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
|
|
6
|
+
import { gridDimensionsSelector } from '../../hooks/features/dimensions/gridDimensionsSelectors';
|
|
4
7
|
function getBorderColor(theme) {
|
|
5
8
|
if (theme.vars) {
|
|
6
9
|
return theme.vars.palette.TableCell.border;
|
|
@@ -26,6 +29,10 @@ const columnHeaderStyles = {
|
|
|
26
29
|
visibility: 'visible'
|
|
27
30
|
}
|
|
28
31
|
};
|
|
32
|
+
|
|
33
|
+
// Emotion thinks it knows better than us which selector we should use.
|
|
34
|
+
// https://github.com/emotion-js/emotion/issues/1105#issuecomment-1722524968
|
|
35
|
+
const ignoreSsrWarning = '/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */';
|
|
29
36
|
export const GridRootStyles = styled('div', {
|
|
30
37
|
name: 'MuiDataGrid',
|
|
31
38
|
slot: 'Root',
|
|
@@ -151,6 +158,8 @@ export const GridRootStyles = styled('div', {
|
|
|
151
158
|
})(({
|
|
152
159
|
theme: t
|
|
153
160
|
}) => {
|
|
161
|
+
const apiRef = useGridPrivateApiContext();
|
|
162
|
+
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
154
163
|
const borderColor = getBorderColor(t);
|
|
155
164
|
const radius = t.shape.borderRadius;
|
|
156
165
|
const containerBackground = t.vars ? t.vars.palette.background.default : t.mixins.MuiDataGrid?.containerBackground ?? t.palette.background.default;
|
|
@@ -213,14 +222,10 @@ export const GridRootStyles = styled('div', {
|
|
|
213
222
|
// See https://github.com/mui/mui-x/issues/8547
|
|
214
223
|
minHeight: 0,
|
|
215
224
|
flexDirection: 'column',
|
|
225
|
+
overflow: 'hidden',
|
|
216
226
|
overflowAnchor: 'none',
|
|
217
227
|
// Keep the same scrolling position
|
|
218
|
-
|
|
219
|
-
// want and prints a warning to the console if we use it, about :first-child being "unsafe" in an SSR context.
|
|
220
|
-
// https://github.com/emotion-js/emotion/issues/1105
|
|
221
|
-
// Using `:first-of-type instead` is ironically less "safe" because if all our elements aren't `div`, this style
|
|
222
|
-
// will fail to apply.
|
|
223
|
-
[`.${c.main} > *:first-of-type`]: {
|
|
228
|
+
[`.${c.main} > *:first-child${ignoreSsrWarning}`]: {
|
|
224
229
|
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
|
|
225
230
|
borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
|
|
226
231
|
},
|
|
@@ -268,6 +273,12 @@ export const GridRootStyles = styled('div', {
|
|
|
268
273
|
[`& .${c.columnHeader}:focus, & .${c.cell}:focus`]: {
|
|
269
274
|
outline: `solid ${t.palette.primary.main} 1px`
|
|
270
275
|
},
|
|
276
|
+
[`&.${c['root--noToolbar']} [aria-rowindex="1"] [aria-colindex="1"]`]: {
|
|
277
|
+
borderTopLeftRadius: 'calc(var(--unstable_DataGrid-radius) - 1px)'
|
|
278
|
+
},
|
|
279
|
+
[`&.${c['root--noToolbar']} [aria-rowindex="1"] .${c['columnHeader--last']}`]: {
|
|
280
|
+
borderTopRightRadius: !dimensions.hasScrollY || dimensions.scrollbarSize === 0 ? 'calc(var(--unstable_DataGrid-radius) - 1px)' : undefined
|
|
281
|
+
},
|
|
271
282
|
[`& .${c.columnHeaderCheckbox}, & .${c.cellCheckbox}`]: {
|
|
272
283
|
padding: 0,
|
|
273
284
|
justifyContent: 'center',
|
|
@@ -407,6 +418,15 @@ export const GridRootStyles = styled('div', {
|
|
|
407
418
|
borderTop: '1px solid var(--DataGrid-rowBorderColor)'
|
|
408
419
|
}
|
|
409
420
|
},
|
|
421
|
+
/* Bottom border of the top-container */
|
|
422
|
+
[`& .${c['row--borderBottom']} .${c.columnHeader},
|
|
423
|
+
& .${c['row--borderBottom']} .${c.filler},
|
|
424
|
+
& .${c['row--borderBottom']} .${c.scrollbarFiller}`]: {
|
|
425
|
+
borderBottom: `1px solid var(--DataGrid-rowBorderColor)`
|
|
426
|
+
},
|
|
427
|
+
[`& .${c['row--borderBottom']} .${c.cell}`]: {
|
|
428
|
+
borderBottom: `1px solid var(--rowBorderColor)`
|
|
429
|
+
},
|
|
410
430
|
/* Row styles */
|
|
411
431
|
[`.${c.row}`]: {
|
|
412
432
|
display: 'flex',
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|