Skip to content

Commit 1dd2a00

Browse files
committed
Merge remote-tracking branch 'upstream/next' into core-integration/40757
2 parents 13dd87e + 8fcf3e8 commit 1dd2a00

File tree

150 files changed

+1993
-958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1993
-958
lines changed

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,106 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 7.0.0-beta.0
7+
8+
_Jan 26, 2024_
9+
10+
We are glad to announce MUI X v7 beta!
11+
This version has several improvements, bug fixes, and exciting features 🎉.
12+
We want to offer a big thanks to the 7 contributors who made this release possible ✨:
13+
14+
- 🚀 Release the [Date Time Range Picker](https://next.mui.com/x/react-date-pickers/date-time-range-picker/) component (#9528) @LukasTy
15+
16+
<img src="https://github.com/mui/mui-x/assets/4941090/122bb7bc-5e72-4e11-a8e5-96f3026de922" width="510" height="652" alt="Date Time Range Picker example" />
17+
18+
- 🎁 New column management panel design for the Data Grid (#11770) @MBilalShafi
19+
20+
<img width="310" alt="image" src="https://github.com/mui/mui-x/assets/12609561/a79dac8b-d54d-4e69-a63a-ef78f3993f37">
21+
22+
- 🐞 Bugfixes
23+
- 📚 Documentation improvements
24+
25+
### Data Grid
26+
27+
#### Breaking changes
28+
29+
- The columns management component has been redesigned and the component was extracted from the `ColumnsPanel` which now only serves as a wrapper to display the component above the headers as a panel. As a result, a new slot `columnsManagement` and the related prop `slotProps.columnsManagement` have been introduced. The props corresponding to the columns management component which were previously passed to the prop `slotProps.columnsPanel` should now be passed to `slotProps.columnsManagement`. `slotProps.columnsPanel` could still be used to override props corresponding to the `Panel` component used in `ColumnsPanel` which uses [`Popper`](https://next.mui.com/material-ui/react-popper/) component under the hood.
30+
31+
```diff
32+
<DataGrid
33+
slotProps={{
34+
- columnsPanel: {
35+
+ columnsManagement: {
36+
sort: 'asc',
37+
autoFocusSearchField: false,
38+
},
39+
}}
40+
/>
41+
```
42+
43+
- `Show all` and `Hide all` buttons in the `ColumnsPanel` have been combined into one `Show/Hide All` toggle in the new columns management component. The related props `disableShowAllButton` and `disableHideAllButton` have been replaced with a new prop `disableShowHideToggle`.
44+
45+
```diff
46+
<DataGrid
47+
- disableShowAllButton
48+
- disableHideAllButton
49+
+ disableShowHideToggle
50+
/>
51+
```
52+
53+
#### `@mui/[email protected]`
54+
55+
- [DataGrid] Export `GridColumnTypes` interface for custom column types (#11742) @cherniavskii
56+
- [DataGrid] Initialize `apiRef` early (#11792) @cherniavskii
57+
- [DataGrid] New column management panel design (#11770) @MBilalShafi
58+
- [DataGrid] Fix support for tree with more than 50,000 children (#11757) @zenazn
59+
60+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
61+
62+
Same changes as in `@mui/[email protected]`.
63+
64+
#### `@mui/[email protected]` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
65+
66+
Same changes as in `@mui/[email protected]`.
67+
68+
### Date Pickers
69+
70+
#### `@mui/[email protected]`
71+
72+
- [pickers] Apply the `layout.tabs` class to `Tabs` slot (#11781) @LukasTy
73+
- [pickers] Avoid deep imports (#11794) @LukasTy
74+
- [pickers] Fields typing optimization (#11779) @LukasTy
75+
76+
#### `@mui/[email protected]` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
77+
78+
Same changes as in `@mui/[email protected]`, plus:
79+
80+
- [pickers] Add `DateTimeRangePicker` component (#9528) @LukasTy
81+
- [pickers] Add `DateTimeRangePicker` theme augmentation (#11814) @LukasTy
82+
- [DateRangePicker] Remove `calendars` prop on `Mobile` (#11752) @LukasTy
83+
84+
### Tree View / `@mui/[email protected]`
85+
86+
- [TreeView] Remove unused props from prop-types and typing (#11778) @flaviendelangle
87+
- [TreeView] Throw an error when two items have the same id (#11715) @flaviendelangle
88+
89+
### Docs
90+
91+
- [docs] Add `contextValue` to the headless tree view doc (#11705) @flaviendelangle
92+
- [docs] Add section for the `disableSelection` prop (#11821) @flaviendelangle
93+
- [docs] Fix brand name non-breaking space (#11758) @oliviertassinari
94+
- [docs] Fix typo in Data Grid components page (#11775) @flaviendelangle
95+
- [docs] Fix use of quote, should use callout (#11759) @oliviertassinari
96+
- [docs] Improve error message for MUI Vale rule @oliviertassinari
97+
- [docs] Include `DateTimeRangePicker` in relevant demos (#11815) @LukasTy
98+
- [docs] Add recipe for sorting row groups by the number of child rows (#11164) @cherniavskii
99+
100+
### Core
101+
102+
- [core] Cleanup script and alias setup (#11749) @LukasTy
103+
- [core] Polish issue templates @oliviertassinari
104+
- [code-infra] Update prettier and pretty-quick (#11735) @Janpot
105+
6106
## 7.0.0-alpha.9
7107

8108
_Jan 19, 2024_

docs/data/data-grid/column-visibility/ColumnSelectorGridCustomizeColumns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function ColumnSelectorGridCustomizeColumns() {
4444
toolbar: GridToolbar,
4545
}}
4646
slotProps={{
47-
columnsPanel: {
47+
columnsManagement: {
4848
getTogglableColumns,
4949
},
5050
}}

docs/data/data-grid/column-visibility/ColumnSelectorGridCustomizeColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function ColumnSelectorGridCustomizeColumns() {
4545
toolbar: GridToolbar,
4646
}}
4747
slotProps={{
48-
columnsPanel: {
48+
columnsManagement: {
4949
getTogglableColumns,
5050
},
5151
}}

docs/data/data-grid/column-visibility/ColumnSelectorGridCustomizeColumns.tsx.preview

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
toolbar: GridToolbar,
77
}}
88
slotProps={{
9-
columnsPanel: {
9+
columnsManagement: {
1010
getTogglableColumns,
1111
},
1212
}}

docs/data/data-grid/column-visibility/ColumnSelectorGridSnap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function ColumnSelectorGridSnap() {
2525
<DataGrid
2626
apiRef={apiRef}
2727
{...data}
28-
slotProps={{ columnsPanel: { autoFocusSearchField: false } }}
28+
slotProps={{ columnsManagement: { autoFocusSearchField: false } }}
2929
/>
3030
</div>
3131
);

docs/data/data-grid/column-visibility/ColumnSelectorGridSnap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function ColumnSelectorGridSnap() {
2525
<DataGrid
2626
apiRef={apiRef}
2727
{...data}
28-
slotProps={{ columnsPanel: { autoFocusSearchField: false } }}
28+
slotProps={{ columnsManagement: { autoFocusSearchField: false } }}
2929
/>
3030
</div>
3131
);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<DataGrid
22
apiRef={apiRef}
33
{...data}
4-
slotProps={{ columnsPanel: { autoFocusSearchField: false } }}
4+
slotProps={{ columnsManagement: { autoFocusSearchField: false } }}
55
/>

docs/data/data-grid/column-visibility/column-visibility.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ You can use the `onColumnVisibilityModelChange` prop to listen to the changes to
5959

6060
## Column visibility panel
6161

62-
The column visibility panel can be opened through the Data Grid toolbar.
63-
To enable it, you need to add `toolbar: GridToolbar` to the Data Grid `slots` prop.
62+
The column visibility panel allows the user to control which columns are visible in the Data Grid.
6463

65-
The user can then choose which columns are visible using the _Columns_ button.
64+
The panel can be opened by:
65+
66+
- Clicking the _Columns_ button in the [toolbar](/x/react-data-grid/components/#toolbar).
67+
- Clicking the _Manage columns_ button in the [column menu](/x/react-data-grid/column-menu/).
6668

6769
{{"demo": "ColumnSelectorGrid.js", "bg": "inline"}}
6870

@@ -79,9 +81,9 @@ In the following demo, the columns panel is disabled, and access to columns `id`
7981

8082
{{"demo": "ColumnSelectorDisabledGrid.js", "bg": "inline"}}
8183

82-
### Customize the list of columns in panel
84+
### Customize the list of columns in columns management
8385

84-
To show or hide specific columns in the column visibility panel, use the `slotProps.columnsPanel.getTogglableColumns` prop. It should return an array of column field names.
86+
To show or hide specific columns in the column visibility panel, use the `slotProps.columnsManagement.getTogglableColumns` prop. It should return an array of column field names.
8587

8688
```tsx
8789
// stop `id`, `__row_group_by_columns_group__`, and `status` columns to be togglable
@@ -98,7 +100,7 @@ const getTogglableColumns = (columns: GridColDef[]) => {
98100
toolbar: GridToolbar,
99101
}}
100102
slotProps={{
101-
columnsPanel: {
103+
columnsManagement: {
102104
getTogglableColumns,
103105
},
104106
}}
@@ -107,19 +109,19 @@ const getTogglableColumns = (columns: GridColDef[]) => {
107109

108110
{{"demo": "ColumnSelectorGridCustomizeColumns.js", "bg": "inline"}}
109111

110-
### Disable action buttons
112+
### Disable actions in footer
111113

112-
To disable `Hide all` or `Show all` buttons in the column visibility panel, pass `disableHideAllButton` or `disableShowAllButton` to `slotProps.columnsPanel`.
114+
To disable `Show/Hide All` checkbox or `Reset` button in the footer of the columns management component, pass `disableShowHideToggle` or `disableResetButton` to `slotProps.columnsManagement`.
113115

114116
```tsx
115117
<DataGrid
116118
slots={{
117119
toolbar: GridToolbar,
118120
}}
119121
slotProps={{
120-
columnsPanel: {
121-
disableHideAllButton: true,
122-
disableShowAllButton: true,
122+
columnsManagement: {
123+
disableShowHideToggle: true,
124+
disableResetButton: true,
123125
},
124126
}}
125127
/>

0 commit comments

Comments
 (0)