@mui/x-data-grid 7.0.0-alpha.3 → 7.0.0-alpha.5
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 +245 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/colDef/gridDefaultColumnTypes.d.ts +2 -2
- package/colDef/gridDefaultColumnTypes.js +2 -2
- package/components/GridRow.js +7 -2
- package/components/base/GridOverlays.js +0 -2
- package/components/cell/GridActionsCell.js +0 -1
- package/components/cell/GridCell.js +0 -2
- package/components/virtualization/GridVirtualScroller.js +0 -1
- package/hooks/features/editing/useGridCellEditing.js +0 -2
- package/hooks/features/editing/useGridRowEditing.js +0 -1
- package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -2
- package/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +7 -5
- package/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/legacy/colDef/gridDefaultColumnTypes.js +2 -2
- package/legacy/components/GridRow.js +7 -2
- package/legacy/components/base/GridOverlays.js +0 -2
- package/legacy/components/cell/GridActionsCell.js +0 -1
- package/legacy/components/cell/GridCell.js +0 -2
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +0 -2
- package/legacy/hooks/features/editing/useGridRowEditing.js +0 -1
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +7 -5
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/locales/coreLocales.js +1 -0
- package/legacy/locales/daDK.js +37 -39
- package/legacy/locales/plPL.js +0 -1
- package/legacy/locales/svSE.js +31 -33
- package/legacy/locales/urPK.js +26 -28
- package/legacy/utils/utils.js +0 -1
- package/locales/coreLocales.js +1 -0
- package/locales/daDK.js +37 -39
- package/locales/plPL.js +0 -1
- package/locales/svSE.js +31 -33
- package/locales/urPK.js +26 -28
- package/models/colDef/gridColType.d.ts +2 -4
- package/models/controlStateItem.d.ts +1 -4
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/modern/colDef/gridDefaultColumnTypes.js +2 -2
- package/modern/components/GridRow.js +7 -2
- package/modern/components/base/GridOverlays.js +0 -2
- package/modern/components/cell/GridActionsCell.js +0 -1
- package/modern/components/cell/GridCell.js +0 -2
- package/modern/components/virtualization/GridVirtualScroller.js +0 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +0 -2
- package/modern/hooks/features/editing/useGridRowEditing.js +0 -1
- package/modern/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +7 -5
- package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/locales/coreLocales.js +1 -0
- package/modern/locales/daDK.js +37 -39
- package/modern/locales/plPL.js +0 -1
- package/modern/locales/svSE.js +31 -33
- package/modern/locales/urPK.js +26 -28
- package/modern/utils/utils.js +0 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/node/colDef/gridDefaultColumnTypes.js +2 -2
- package/node/components/GridRow.js +7 -2
- package/node/components/base/GridOverlays.js +0 -2
- package/node/components/cell/GridActionsCell.js +0 -1
- package/node/components/cell/GridCell.js +0 -2
- package/node/components/virtualization/GridVirtualScroller.js +0 -1
- package/node/hooks/features/editing/useGridCellEditing.js +0 -2
- package/node/hooks/features/editing/useGridRowEditing.js +0 -1
- package/node/hooks/features/focus/gridFocusStateSelector.js +3 -7
- package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -7
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -4
- package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +14 -14
- package/node/locales/daDK.js +37 -39
- package/node/locales/plPL.js +0 -1
- package/node/locales/svSE.js +31 -33
- package/node/locales/urPK.js +26 -28
- package/node/utils/utils.js +0 -1
- package/package.json +4 -4
- package/utils/createSelector.d.ts +1 -1
- package/utils/utils.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,169 @@
|
|
|
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.0.0-alpha.5
|
|
7
|
+
|
|
8
|
+
_Dec 14, 2023_
|
|
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
|
+
- 💫 New recipe added for the Data Grid
|
|
13
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### Data Grid
|
|
17
|
+
|
|
18
|
+
#### Breaking changes
|
|
19
|
+
|
|
20
|
+
- The `instanceId` prop is now required for state selectors.
|
|
21
|
+
This prop is used to distinguish between multiple Data Grid instances on the same page.
|
|
22
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#instanceid-prop-is-required-for-state-selectors) for more details.
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@7.0.0-alpha.5`
|
|
25
|
+
|
|
26
|
+
- [DataGrid] Make `instanceId` required for state selectors (#11395) @cherniavskii
|
|
27
|
+
- [DataGrid] Recipe for grouped rows autosizing (#11401) @michelengelen
|
|
28
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11373) @fredrikcarlbom
|
|
29
|
+
- [l10n] Improve Urdu (ur-PK) locale (#11400) @MBilalShafi
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.5`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
38
|
+
|
|
39
|
+
### Date Pickers
|
|
40
|
+
|
|
41
|
+
#### Breaking changes
|
|
42
|
+
|
|
43
|
+
- The slot interfaces got renamed to match with `@mui/base` naming.
|
|
44
|
+
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
45
|
+
|
|
46
|
+
```diff
|
|
47
|
+
- DateCalendarSlotsComponent
|
|
48
|
+
+ DateCalendarSlots
|
|
49
|
+
- DateCalendarSlotsComponentsProps
|
|
50
|
+
+ DateCalendarSlotProps
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
54
|
+
|
|
55
|
+
- [fields] Support empty sections (#10307) @flaviendelangle
|
|
56
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
|
|
57
|
+
- [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
|
|
58
|
+
- [pickers] Rename slots interfaces (#11339) @alexfauquette
|
|
59
|
+
- [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
|
|
60
|
+
- [pickers] Support name prop (#11025) @gitstart
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
63
|
+
|
|
64
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
|
|
65
|
+
|
|
66
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11273) @kealjones-wk
|
|
67
|
+
|
|
68
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
69
|
+
|
|
70
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
71
|
+
|
|
72
|
+
### `@mui/x-codemod@7.0.0-alpha.5`
|
|
73
|
+
|
|
74
|
+
- [codemod] Add `cellSelection` codemod and update migration guide (#11353) @MBilalShafi
|
|
75
|
+
|
|
76
|
+
### Docs
|
|
77
|
+
|
|
78
|
+
- [docs] Respect GoT books (@janoma) (#11387) @alexfauquette
|
|
79
|
+
|
|
80
|
+
### Core
|
|
81
|
+
|
|
82
|
+
- [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
|
|
83
|
+
- [github] Update `no-response` workflow (#11369) @MBilalShafi
|
|
84
|
+
- [test] Fix flaky screenshots (#11388) @cherniavskii
|
|
85
|
+
|
|
86
|
+
## 7.0.0-alpha.4
|
|
87
|
+
|
|
88
|
+
_Dec 8, 2023_
|
|
89
|
+
|
|
90
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
91
|
+
|
|
92
|
+
- 🚀 The scatter charts now use voronoi to trigger items
|
|
93
|
+
|
|
94
|
+
Users needed to hover the item to highlight the scatter item or show the tooltip.
|
|
95
|
+
Now they can interact with data by triggering the closest element. See the [docs page](https://next.mui.com/x/react-charts/scatter/#interaction) for more info.
|
|
96
|
+
|
|
97
|
+
- 📚 Add [Pickers FAQ page](https://next.mui.com/x/react-date-pickers/faq/)
|
|
98
|
+
- 🎉 The Data Grid Header filters feature is now stable
|
|
99
|
+
- 🌍 Improve Danish (da-DK) locale on Data Grid
|
|
100
|
+
- 🐞 Bugfixes
|
|
101
|
+
|
|
102
|
+
### Data Grid
|
|
103
|
+
|
|
104
|
+
#### Breaking changes
|
|
105
|
+
|
|
106
|
+
- The header filters feature is now stable. `unstable_` prefix is removed from prop `headerFilters` and related exports.
|
|
107
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#filtering) for more details.
|
|
108
|
+
|
|
109
|
+
- The `GridColDef['type']` has been narrowed down to only accept the built-in column types.
|
|
110
|
+
TypeScript users need to use the `GridColDef` interface when defining columns:
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
// 🛑 `type` is inferred as `string` and is too wide
|
|
114
|
+
const columns = [{ type: 'number', field: 'id' }];
|
|
115
|
+
<DataGrid columns={columns} />;
|
|
116
|
+
|
|
117
|
+
// ✅ `type` is `'number'`
|
|
118
|
+
const columns: GridColDef[] = [{ type: 'number', field: 'id' }];
|
|
119
|
+
<DataGrid columns={columns} />;
|
|
120
|
+
|
|
121
|
+
// ✅ Alternalively, `as const` can be used to narrow down the type
|
|
122
|
+
const columns = [{ type: 'number' as const, field: 'id' }];
|
|
123
|
+
<DataGrid columns={columns} />;
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-data-grid@7.0.0-alpha.4`
|
|
127
|
+
|
|
128
|
+
- [DataGrid] Added a guard for reorder cells (#11159) @michelengelen
|
|
129
|
+
- [DataGrid] Narrow down `GridColDef['type']` (#11270) @cherniavskii
|
|
130
|
+
- [l10n] Improve Danish (da-DK) locale (#11304) @goibon
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.4`, plus:
|
|
135
|
+
|
|
136
|
+
- [DataGridPro] Make header filters feature stable (#11243) @MBilalShafi
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.4`.
|
|
141
|
+
|
|
142
|
+
### Date Pickers
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.4`
|
|
145
|
+
|
|
146
|
+
- [fields] Rework `PickersTextField` (#11258) @flaviendelangle
|
|
147
|
+
- [pickers] Fix `MultiSectionDigitalClock` issues (#11305) @LukasTy
|
|
148
|
+
- [pickers] Fix views height consistency (#11337) @LukasTy
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.4`.
|
|
153
|
+
|
|
154
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.4`
|
|
155
|
+
|
|
156
|
+
- [charts] Remove animation on sparkline (#11311) @oliviertassinari
|
|
157
|
+
- [charts] Use voronoi cells to trigger interaction with scatter items (#10981) @alexfauquette
|
|
158
|
+
- [charts] Add `@mui/utils` as a dependency (#11351) @michelengelen
|
|
159
|
+
|
|
160
|
+
### Docs
|
|
161
|
+
|
|
162
|
+
- [docs] Add FAQ page (#11271) @noraleonte
|
|
163
|
+
- [docs] Add a doc section on how to override the start of the week with each adapter (#11223) @flaviendelangle
|
|
164
|
+
- [docs] Added params to `onPaginationModelChange` docs (#10191) @JFBenzs
|
|
165
|
+
- [docs] Fix typo (#11324) @cadam11
|
|
166
|
+
- [docs] Improve `DemoContainer` styling coverage (#11315) @LukasTy
|
|
167
|
+
- [docs] General revision of the Charts docs (#11249) @danilo-leal
|
|
168
|
+
|
|
6
169
|
## 7.0.0-alpha.3
|
|
7
170
|
|
|
8
171
|
_Dec 4, 2023_
|
|
@@ -866,6 +1029,88 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
866
1029
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
867
1030
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
868
1031
|
|
|
1032
|
+
## 6.18.5
|
|
1033
|
+
|
|
1034
|
+
_Dec 14, 2023_
|
|
1035
|
+
|
|
1036
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
1037
|
+
|
|
1038
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
1039
|
+
- 🐞 Bugfixes
|
|
1040
|
+
|
|
1041
|
+
### Data Grid
|
|
1042
|
+
|
|
1043
|
+
#### `@mui/x-data-grid@6.18.5`
|
|
1044
|
+
|
|
1045
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11379) @fredrikcarlbom
|
|
1046
|
+
- [l10n] Improve Urdu (ur-PK) locale for data grid (#11409) @MBilalShafi
|
|
1047
|
+
|
|
1048
|
+
#### `@mui/x-data-grid-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1049
|
+
|
|
1050
|
+
Same changes as in `@mui/x-data-grid@6.18.5`.
|
|
1051
|
+
|
|
1052
|
+
#### `@mui/x-data-grid-premium@6.18.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1053
|
+
|
|
1054
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.5`.
|
|
1055
|
+
|
|
1056
|
+
### Date Pickers
|
|
1057
|
+
|
|
1058
|
+
#### `@mui/x-date-pickers@6.18.5`
|
|
1059
|
+
|
|
1060
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11398) @LukasTy
|
|
1061
|
+
- [pickers] Support name prop (#11380) @gitstart
|
|
1062
|
+
|
|
1063
|
+
#### `@mui/x-date-pickers-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1064
|
+
|
|
1065
|
+
Same changes as in `@mui/x-date-pickers@6.18.5`, plus:
|
|
1066
|
+
|
|
1067
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11376) @kealjones-wk
|
|
1068
|
+
|
|
1069
|
+
### Docs
|
|
1070
|
+
|
|
1071
|
+
- [docs] Respect GoT books (#11294) @janoma
|
|
1072
|
+
- [test] Fix flaky screenshots (#11391) @cherniavskii
|
|
1073
|
+
|
|
1074
|
+
## 6.18.4
|
|
1075
|
+
|
|
1076
|
+
_Dec 8, 2023_
|
|
1077
|
+
|
|
1078
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
1079
|
+
|
|
1080
|
+
- 📚 Add [Pickers FAQ page](https://mui.com/x/react-date-pickers/faq/)
|
|
1081
|
+
- 🌍 Improve Danish (da-DK) locale on Data Grid
|
|
1082
|
+
- 🐞 Bugfixes
|
|
1083
|
+
|
|
1084
|
+
### Data Grid
|
|
1085
|
+
|
|
1086
|
+
#### `@mui/x-data-grid@6.18.4`
|
|
1087
|
+
|
|
1088
|
+
- [DataGrid] Fix cell slot style override (#11215) @oliviertassinari
|
|
1089
|
+
- [l10n] Improve Danish (da-DK) locale (#11346) @goibon
|
|
1090
|
+
|
|
1091
|
+
#### `@mui/x-data-grid-pro@6.18.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1092
|
+
|
|
1093
|
+
Same changes as in `@mui/x-data-grid@6.18.4`.
|
|
1094
|
+
|
|
1095
|
+
#### `@mui/x-data-grid-premium@6.18.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1096
|
+
|
|
1097
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.4`.
|
|
1098
|
+
|
|
1099
|
+
### Date Pickers
|
|
1100
|
+
|
|
1101
|
+
#### `@mui/x-date-pickers@6.18.4`
|
|
1102
|
+
|
|
1103
|
+
- [pickers] Fix `MultiSectionDigitalClock` issues (#11308) @LukasTy
|
|
1104
|
+
|
|
1105
|
+
#### `@mui/x-date-pickers-pro@6.18.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1106
|
+
|
|
1107
|
+
Same changes as in `@mui/x-date-pickers@6.18.4`.
|
|
1108
|
+
|
|
1109
|
+
### Docs
|
|
1110
|
+
|
|
1111
|
+
- [docs] Fix typo (#11323) @cadam11
|
|
1112
|
+
- [docs] Add FAQ page (#11347) @noraleonte
|
|
1113
|
+
|
|
869
1114
|
## 6.18.3
|
|
870
1115
|
|
|
871
1116
|
_Dec 4, 2023_
|
|
@@ -7,8 +7,8 @@ import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
9
9
|
export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
|
10
|
+
type: 'custom',
|
|
10
11
|
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
11
|
-
type: 'checkboxSelection',
|
|
12
12
|
width: 50,
|
|
13
13
|
resizable: false,
|
|
14
14
|
sortable: false,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GridColumnTypesRecord } from '../models/colDef/gridColumnTypesRecord';
|
|
2
|
-
export declare const DEFAULT_GRID_COL_TYPE_KEY = "
|
|
1
|
+
import type { GridColumnTypesRecord } from '../models/colDef/gridColumnTypesRecord';
|
|
2
|
+
export declare const DEFAULT_GRID_COL_TYPE_KEY = "string";
|
|
3
3
|
export declare const getGridDefaultColumnTypes: () => GridColumnTypesRecord;
|
|
@@ -4,7 +4,7 @@ import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from './gridDateColDef';
|
|
|
4
4
|
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
5
5
|
import { GRID_SINGLE_SELECT_COL_DEF } from './gridSingleSelectColDef';
|
|
6
6
|
import { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from './gridActionsColDef';
|
|
7
|
-
export const DEFAULT_GRID_COL_TYPE_KEY = '
|
|
7
|
+
export const DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
8
8
|
export const getGridDefaultColumnTypes = () => {
|
|
9
9
|
const nativeColumnTypes = {
|
|
10
10
|
string: GRID_STRING_COL_DEF,
|
|
@@ -14,7 +14,7 @@ export const getGridDefaultColumnTypes = () => {
|
|
|
14
14
|
boolean: GRID_BOOLEAN_COL_DEF,
|
|
15
15
|
singleSelect: GRID_SINGLE_SELECT_COL_DEF,
|
|
16
16
|
[GRID_ACTIONS_COLUMN_TYPE]: GRID_ACTIONS_COL_DEF,
|
|
17
|
-
|
|
17
|
+
custom: GRID_STRING_COL_DEF
|
|
18
18
|
};
|
|
19
19
|
return nativeColumnTypes;
|
|
20
20
|
};
|
package/components/GridRow.js
CHANGED
|
@@ -53,7 +53,6 @@ function EmptyCell({
|
|
|
53
53
|
style: style
|
|
54
54
|
}); // TODO change to .MuiDataGrid-emptyCell or .MuiDataGrid-rowFiller
|
|
55
55
|
}
|
|
56
|
-
|
|
57
56
|
const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
58
57
|
const {
|
|
59
58
|
selected,
|
|
@@ -194,7 +193,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
194
193
|
const rowReordering = rootProps.rowReordering;
|
|
195
194
|
const getCell = (column, cellProps) => {
|
|
196
195
|
var _editRowsState$rowId$, _editRowsState$rowId;
|
|
197
|
-
|
|
196
|
+
// when the cell is a reorder cell we are not allowing to reorder the col
|
|
197
|
+
// fixes https://github.com/mui/mui-x/issues/11126
|
|
198
|
+
const isReorderCell = column.field === '__reorder__';
|
|
199
|
+
const isEditingRows = Object.keys(editRowsState).length > 0;
|
|
200
|
+
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
201
|
+
const canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;
|
|
202
|
+
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
198
203
|
const editCellState = (_editRowsState$rowId$ = (_editRowsState$rowId = editRowsState[rowId]) == null ? void 0 : _editRowsState$rowId[column.field]) != null ? _editRowsState$rowId$ : null;
|
|
199
204
|
let cellIsNotVisible = false;
|
|
200
205
|
if (focusedCellColumnIndexNotInRange !== undefined && visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
|
|
@@ -31,7 +31,6 @@ const GridOverlayWrapperRoot = styled('div', {
|
|
|
31
31
|
zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel
|
|
32
32
|
: 4 // Should be above pinned columns and detail panel
|
|
33
33
|
}));
|
|
34
|
-
|
|
35
34
|
const GridOverlayWrapperInner = styled('div', {
|
|
36
35
|
name: 'MuiDataGrid',
|
|
37
36
|
slot: 'OverlayWrapperInner',
|
|
@@ -67,7 +66,6 @@ function GridOverlayWrapper(props) {
|
|
|
67
66
|
if (rootProps.autoHeight && height === 0) {
|
|
68
67
|
height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
69
68
|
}
|
|
70
|
-
|
|
71
69
|
const classes = useUtilityClasses(_extends({}, props, {
|
|
72
70
|
classes: rootProps.classes
|
|
73
71
|
}));
|
|
@@ -128,7 +128,6 @@ function GridActionsCell(props) {
|
|
|
128
128
|
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
129
129
|
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
130
130
|
}
|
|
131
|
-
|
|
132
131
|
if (newIndex !== focusedButtonIndex) {
|
|
133
132
|
event.preventDefault(); // Prevent scrolling
|
|
134
133
|
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
@@ -243,7 +243,6 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
243
243
|
minHeight: height,
|
|
244
244
|
maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
|
|
245
245
|
};
|
|
246
|
-
|
|
247
246
|
return cellStyle;
|
|
248
247
|
}, [width, height, isNotVisible]);
|
|
249
248
|
React.useEffect(() => {
|
|
@@ -512,7 +511,6 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
512
511
|
minHeight: height,
|
|
513
512
|
maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
|
|
514
513
|
};
|
|
515
|
-
|
|
516
514
|
return cellStyle;
|
|
517
515
|
}, [width, height, isNotVisible]);
|
|
518
516
|
React.useEffect(() => {
|
|
@@ -29,7 +29,6 @@ const VirtualScrollerRoot = styled('div', {
|
|
|
29
29
|
},
|
|
30
30
|
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
31
31
|
});
|
|
32
|
-
|
|
33
32
|
const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
34
33
|
const rootProps = useGridRootProps();
|
|
35
34
|
const classes = useUtilityClasses(rootProps);
|
|
@@ -81,7 +81,6 @@ export const useGridCellEditing = (apiRef, props) => {
|
|
|
81
81
|
reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;
|
|
82
82
|
event.preventDefault(); // Prevent going to the next element in the tab sequence
|
|
83
83
|
}
|
|
84
|
-
|
|
85
84
|
if (reason) {
|
|
86
85
|
const newParams = _extends({}, params, {
|
|
87
86
|
reason
|
|
@@ -175,7 +174,6 @@ export const useGridCellEditing = (apiRef, props) => {
|
|
|
175
174
|
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
|
176
175
|
return; // The prop always win
|
|
177
176
|
}
|
|
178
|
-
|
|
179
177
|
setCellModesModel(newModel);
|
|
180
178
|
cellModesModelRef.current = newModel;
|
|
181
179
|
apiRef.current.publishEvent('cellModesModelChange', newModel);
|
|
@@ -240,7 +240,6 @@ export const useGridRowEditing = (apiRef, props) => {
|
|
|
240
240
|
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
|
241
241
|
return; // The prop always win
|
|
242
242
|
}
|
|
243
|
-
|
|
244
243
|
setRowModesModel(newModel);
|
|
245
244
|
rowModesModelRef.current = newModel;
|
|
246
245
|
apiRef.current.publishEvent('rowModesModelChange', newModel);
|
|
@@ -3,10 +3,10 @@ import { GridFocusState, GridTabIndexState } from './gridFocusState';
|
|
|
3
3
|
export declare const gridFocusStateSelector: (state: GridStateCommunity) => GridFocusState;
|
|
4
4
|
export declare const gridFocusCellSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("../../..").GridCellCoordinates | null>;
|
|
5
5
|
export declare const gridFocusColumnHeaderSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnIdentifier | null>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const gridFocusColumnHeaderFilterSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnIdentifier | null>;
|
|
7
7
|
export declare const unstable_gridFocusColumnGroupHeaderSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnGroupIdentifier | null>;
|
|
8
8
|
export declare const gridTabIndexStateSelector: (state: GridStateCommunity) => GridTabIndexState;
|
|
9
9
|
export declare const gridTabIndexCellSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("../../..").GridCellCoordinates | null>;
|
|
10
10
|
export declare const gridTabIndexColumnHeaderSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnIdentifier | null>;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const gridTabIndexColumnHeaderFilterSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnIdentifier | null>;
|
|
12
12
|
export declare const unstable_gridTabIndexColumnGroupHeaderSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, import("./gridFocusState").GridColumnGroupIdentifier | null>;
|
|
@@ -2,18 +2,14 @@ import { createSelector } from '../../../utils/createSelector';
|
|
|
2
2
|
export const gridFocusStateSelector = state => state.focus;
|
|
3
3
|
export const gridFocusCellSelector = createSelector(gridFocusStateSelector, focusState => focusState.cell);
|
|
4
4
|
export const gridFocusColumnHeaderSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnHeader);
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
-
export const unstable_gridFocusColumnHeaderFilterSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnHeaderFilter);
|
|
5
|
+
export const gridFocusColumnHeaderFilterSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnHeaderFilter);
|
|
8
6
|
|
|
9
7
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
8
|
export const unstable_gridFocusColumnGroupHeaderSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnGroupHeader);
|
|
11
9
|
export const gridTabIndexStateSelector = state => state.tabIndex;
|
|
12
10
|
export const gridTabIndexCellSelector = createSelector(gridTabIndexStateSelector, state => state.cell);
|
|
13
11
|
export const gridTabIndexColumnHeaderSelector = createSelector(gridTabIndexStateSelector, state => state.columnHeader);
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
16
|
-
export const unstable_gridTabIndexColumnHeaderFilterSelector = createSelector(gridTabIndexStateSelector, state => state.columnHeaderFilter);
|
|
12
|
+
export const gridTabIndexColumnHeaderFilterSelector = createSelector(gridTabIndexStateSelector, state => state.columnHeaderFilter);
|
|
17
13
|
|
|
18
14
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
19
15
|
export const unstable_gridTabIndexColumnGroupHeaderSelector = createSelector(gridTabIndexStateSelector, state => state.columnGroupHeader);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridStateCommunity } from '../../../models/gridStateCommunity';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const gridHeaderFilteringStateSelector: (state: GridStateCommunity) => import("../../../models/gridHeaderFilteringModel").GridHeaderFilteringState;
|
|
3
|
+
export declare const gridHeaderFilteringEditFieldSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, string | null>;
|
|
4
|
+
export declare const gridHeaderFilteringMenuSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, string | null>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
1
|
import { createSelector } from '../../../utils/createSelector';
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
2
|
+
export const gridHeaderFilteringStateSelector = state => state.headerFiltering;
|
|
3
|
+
export const gridHeaderFilteringEditFieldSelector = createSelector(gridHeaderFilteringStateSelector, headerFilteringState => headerFilteringState.editing);
|
|
4
|
+
export const gridHeaderFilteringMenuSelector = createSelector(gridHeaderFilteringStateSelector, headerFilteringState => headerFilteringState.menuOpen);
|
|
@@ -13,7 +13,7 @@ import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '../../../constants/gridDetailPan
|
|
|
13
13
|
import { gridPinnedRowsSelector } from '../rows/gridRowsSelector';
|
|
14
14
|
import { unstable_gridFocusColumnGroupHeaderSelector } from '../focus';
|
|
15
15
|
import { gridColumnGroupsHeaderMaxDepthSelector } from '../columnGrouping/gridColumnGroupsSelector';
|
|
16
|
-
import {
|
|
16
|
+
import { gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector } from '../headerFiltering/gridHeaderFilteringSelectors';
|
|
17
17
|
import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
|
|
18
18
|
import { isEventTargetInPortal } from '../../../utils/domUtils';
|
|
19
19
|
function enrichPageRowsWithPinnedRows(apiRef, rows) {
|
|
@@ -71,7 +71,7 @@ export const useGridKeyboardNavigation = (apiRef, props) => {
|
|
|
71
71
|
const currentPageRows = React.useMemo(() => enrichPageRowsWithPinnedRows(apiRef, initialCurrentPageRows), [apiRef, initialCurrentPageRows]);
|
|
72
72
|
const headerFilteringEnabled =
|
|
73
73
|
// @ts-expect-error // TODO move relevant code to the `DataGridPro`
|
|
74
|
-
props.signature !== 'DataGrid' && props.
|
|
74
|
+
props.signature !== 'DataGrid' && props.headerFilters;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* @param {number} colIndex Index of the column to focus
|
|
@@ -238,8 +238,8 @@ export const useGridKeyboardNavigation = (apiRef, props) => {
|
|
|
238
238
|
if (!dimensions) {
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
|
-
const isEditing =
|
|
242
|
-
const isHeaderMenuOpen =
|
|
241
|
+
const isEditing = gridHeaderFilteringEditFieldSelector(apiRef) === params.field;
|
|
242
|
+
const isHeaderMenuOpen = gridHeaderFilteringMenuSelector(apiRef) === params.field;
|
|
243
243
|
if (isEditing || isHeaderMenuOpen || !isNavigationKey(event.key)) {
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
@@ -507,7 +507,9 @@ export const useGridKeyboardNavigation = (apiRef, props) => {
|
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
509
|
const colDef = params.colDef;
|
|
510
|
-
if (colDef &&
|
|
510
|
+
if (colDef &&
|
|
511
|
+
// `GRID_TREE_DATA_GROUPING_FIELD` from the Pro package
|
|
512
|
+
colDef.field === '__tree_data_group__') {
|
|
511
513
|
break;
|
|
512
514
|
}
|
|
513
515
|
if (!event.shiftKey && rowIndexBefore < lastRowIndexInPage) {
|
|
@@ -555,7 +555,6 @@ export const useGridVirtualScroller = props => {
|
|
|
555
555
|
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
556
556
|
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
557
557
|
}
|
|
558
|
-
|
|
559
558
|
return size;
|
|
560
559
|
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
561
560
|
React.useEffect(() => {
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { useGridInitialization } from '../hooks/core/useGridInitialization';
|
|
|
14
14
|
export { unwrapPrivateAPI } from '../hooks/core/useGridApiInitialization';
|
|
15
15
|
export { useGridClipboard } from '../hooks/features/clipboard/useGridClipboard';
|
|
16
16
|
export { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
17
|
-
export {
|
|
17
|
+
export { gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector, } from '../hooks/features/headerFiltering/gridHeaderFilteringSelectors';
|
|
18
18
|
export type { GridSlotsComponentsProps } from '../models/gridSlotsComponentsProps';
|
|
19
19
|
export type { UseGridColumnHeadersProps, GetHeadersParams, } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
20
20
|
export { useGridColumnMenu, columnMenuStateInitializer, } from '../hooks/features/columnMenu/useGridColumnMenu';
|
package/internals/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export { useGridInitialization } from '../hooks/core/useGridInitialization';
|
|
|
11
11
|
export { unwrapPrivateAPI } from '../hooks/core/useGridApiInitialization';
|
|
12
12
|
export { useGridClipboard } from '../hooks/features/clipboard/useGridClipboard';
|
|
13
13
|
export { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
14
|
-
export {
|
|
14
|
+
export { gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector } from '../hooks/features/headerFiltering/gridHeaderFilteringSelectors';
|
|
15
15
|
export { useGridColumnMenu, columnMenuStateInitializer } from '../hooks/features/columnMenu/useGridColumnMenu';
|
|
16
16
|
export { useGridColumns, columnsStateInitializer } from '../hooks/features/columns/useGridColumns';
|
|
17
17
|
export { getTotalHeaderHeight } from '../hooks/features/columns/gridColumnsUtils';
|
|
@@ -7,8 +7,8 @@ import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export var GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
9
9
|
export var GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
|
10
|
+
type: 'custom',
|
|
10
11
|
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
11
|
-
type: 'checkboxSelection',
|
|
12
12
|
width: 50,
|
|
13
13
|
resizable: false,
|
|
14
14
|
sortable: false,
|
|
@@ -5,7 +5,7 @@ import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from './gridDateColDef';
|
|
|
5
5
|
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
6
6
|
import { GRID_SINGLE_SELECT_COL_DEF } from './gridSingleSelectColDef';
|
|
7
7
|
import { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from './gridActionsColDef';
|
|
8
|
-
export var DEFAULT_GRID_COL_TYPE_KEY = '
|
|
8
|
+
export var DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
9
9
|
export var getGridDefaultColumnTypes = function getGridDefaultColumnTypes() {
|
|
10
10
|
var nativeColumnTypes = _defineProperty(_defineProperty({
|
|
11
11
|
string: GRID_STRING_COL_DEF,
|
|
@@ -14,6 +14,6 @@ export var getGridDefaultColumnTypes = function getGridDefaultColumnTypes() {
|
|
|
14
14
|
dateTime: GRID_DATETIME_COL_DEF,
|
|
15
15
|
boolean: GRID_BOOLEAN_COL_DEF,
|
|
16
16
|
singleSelect: GRID_SINGLE_SELECT_COL_DEF
|
|
17
|
-
}, GRID_ACTIONS_COLUMN_TYPE, GRID_ACTIONS_COL_DEF),
|
|
17
|
+
}, GRID_ACTIONS_COLUMN_TYPE, GRID_ACTIONS_COL_DEF), "custom", GRID_STRING_COL_DEF);
|
|
18
18
|
return nativeColumnTypes;
|
|
19
19
|
};
|
|
@@ -52,7 +52,6 @@ function EmptyCell(_ref) {
|
|
|
52
52
|
style: style
|
|
53
53
|
}); // TODO change to .MuiDataGrid-emptyCell or .MuiDataGrid-rowFiller
|
|
54
54
|
}
|
|
55
|
-
|
|
56
55
|
var GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
57
56
|
var selected = props.selected,
|
|
58
57
|
hovered = props.hovered,
|
|
@@ -197,7 +196,13 @@ var GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
197
196
|
var rowReordering = rootProps.rowReordering;
|
|
198
197
|
var getCell = function getCell(column, cellProps) {
|
|
199
198
|
var _editRowsState$rowId$, _editRowsState$rowId;
|
|
200
|
-
|
|
199
|
+
// when the cell is a reorder cell we are not allowing to reorder the col
|
|
200
|
+
// fixes https://github.com/mui/mui-x/issues/11126
|
|
201
|
+
var isReorderCell = column.field === '__reorder__';
|
|
202
|
+
var isEditingRows = Object.keys(editRowsState).length > 0;
|
|
203
|
+
var canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
204
|
+
var canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;
|
|
205
|
+
var disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
201
206
|
var editCellState = (_editRowsState$rowId$ = (_editRowsState$rowId = editRowsState[rowId]) == null ? void 0 : _editRowsState$rowId[column.field]) != null ? _editRowsState$rowId$ : null;
|
|
202
207
|
var cellIsNotVisible = false;
|
|
203
208
|
if (focusedCellColumnIndexNotInRange !== undefined && visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
|
|
@@ -37,7 +37,6 @@ var GridOverlayWrapperRoot = styled('div', {
|
|
|
37
37
|
: 4 // Should be above pinned columns and detail panel
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
|
-
|
|
41
40
|
var GridOverlayWrapperInner = styled('div', {
|
|
42
41
|
name: 'MuiDataGrid',
|
|
43
42
|
slot: 'OverlayWrapperInner',
|
|
@@ -78,7 +77,6 @@ function GridOverlayWrapper(props) {
|
|
|
78
77
|
if (rootProps.autoHeight && height === 0) {
|
|
79
78
|
height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
80
79
|
}
|
|
81
|
-
|
|
82
80
|
var classes = useUtilityClasses(_extends({}, props, {
|
|
83
81
|
classes: rootProps.classes
|
|
84
82
|
}));
|
|
@@ -159,7 +159,6 @@ function GridActionsCell(props) {
|
|
|
159
159
|
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
160
160
|
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
161
161
|
}
|
|
162
|
-
|
|
163
162
|
if (newIndex !== focusedButtonIndex) {
|
|
164
163
|
event.preventDefault(); // Prevent scrolling
|
|
165
164
|
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
@@ -244,7 +244,6 @@ var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
244
244
|
minHeight: height,
|
|
245
245
|
maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
|
|
246
246
|
};
|
|
247
|
-
|
|
248
247
|
return cellStyle;
|
|
249
248
|
}, [width, height, isNotVisible]);
|
|
250
249
|
React.useEffect(function () {
|
|
@@ -520,7 +519,6 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
520
519
|
minHeight: height,
|
|
521
520
|
maxHeight: height === 'auto' ? 'none' : height // max-height doesn't support "auto"
|
|
522
521
|
};
|
|
523
|
-
|
|
524
522
|
return cellStyle;
|
|
525
523
|
}, [width, height, isNotVisible]);
|
|
526
524
|
React.useEffect(function () {
|