|
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 | +## [4.0.0-alpha.18](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.17...v4.0.0-alpha.18) |
| 7 | + |
| 8 | +###### _Jan 26, 2021_ |
| 9 | + |
| 10 | +Big thanks to the 5 contributors who made this release possible. Here are some highlights ✨: |
| 11 | + |
| 12 | +- 🎁 Add support for Material-UI v5-alpha (#855) @DanailH. |
| 13 | + The data grid supports Material-UI v4 and v5. We aim to retain the support for v4 as long as v5 hasn't reached the beta phase. |
| 14 | +- 💅 Update the customization API to be closer to Material-UI v5. |
| 15 | + The date grid accepts two props: `components` and `componentsProps`. |
| 16 | + The first prop allows to swapping specific components used in slots the grid, like the checkboxes. |
| 17 | + The second one allows providing extra props to each slot. It avoids the need for using the React context to access information from outside the data grid. |
| 18 | + |
| 19 | + See the [RFC](https://github.com/mui-org/material-ui/issues/21453) for more details. |
| 20 | +- 🐛 Polish existing features, fix 3 issues. |
| 21 | + |
| 22 | +### @material-ui/x-grid@v4.0.0-alpha.18 / @material-ui/data-grid@v4.0.0-alpha.18 |
| 23 | + |
| 24 | +#### Breaking changes |
| 25 | + |
| 26 | +- [DataGrid] Implement customization pattern of Material-UI v5 (#851, #879) @dtassone |
| 27 | + |
| 28 | + - Capitalize the keys of the `components` prop. This change aims to bring consistency with the customization pattern of Material-UI v5: |
| 29 | + |
| 30 | + ```diff |
| 31 | + <DataGrid |
| 32 | + components={{ |
| 33 | + - noRowsOverlay: CustomNoRowsOverlay, |
| 34 | + + NoRowOverlay: CustomNoRowsOverlay, |
| 35 | + }} |
| 36 | + /> |
| 37 | + ``` |
| 38 | + |
| 39 | + - Move all the icon components overrides in the `components` prop. And added the suffix 'Icon' on each icon component. This change aims to bring consistency with the customization pattern of Material-UI v5: |
| 40 | + |
| 41 | + ```diff |
| 42 | + <DataGrid |
| 43 | + - icons: {{ |
| 44 | + - ColumnSortedAscending: SortedAscending, |
| 45 | + - }}, |
| 46 | + + components={{ |
| 47 | + + ColumnSortedAscendingIcon: SortedAscending, |
| 48 | + + }} |
| 49 | + /> |
| 50 | + ``` |
| 51 | + |
| 52 | + - Change the props provided to the component of the `components` prop. Expose the whole state instead of an arbitrary set of props: |
| 53 | + |
| 54 | + ```diff |
| 55 | + -function CustomPagination(props: ComponentProps) { |
| 56 | + - const { pagination, api } = props; |
| 57 | + +function CustomPagination(props: BaseComponentProps) { |
| 58 | + + const { state, api } = props; |
| 59 | + |
| 60 | + return ( |
| 61 | + <Pagination |
| 62 | + - page={pagination.page} |
| 63 | + - count={pagination.pageCount} |
| 64 | + + page={state.pagination.page} |
| 65 | + + count={state.pagination.pageCount} |
| 66 | + |
| 67 | + // ... |
| 68 | + |
| 69 | + <DataGrid components={{ Pagination: CustomPagination }} /> |
| 70 | + ``` |
| 71 | + |
| 72 | +#### Changes |
| 73 | + |
| 74 | +- [DataGrid] Add customisation on panels (#890) @dtassone |
| 75 | +- [DataGrid] Add support for Material-UI v5-alpha (#855) @DanailH |
| 76 | +- [DataGrid] Fix footer count not shown on small screen (#899) @mnajdova |
| 77 | +- [DataGrid] Fix column selector crash when hiding columns (#875) @DanailH |
| 78 | +- [DataGrid] Fix <kbd>Shift</kbd> + <kbd>Space</kbd> keyboard regression to select row (#897) @dtassone |
| 79 | + |
| 80 | +### docs |
| 81 | + |
| 82 | +- [docs] Fix imports for x-grid-data-generator (#887) @DanailH |
| 83 | +- [docs] Skip download of playwright for docs @oliviertassinari |
| 84 | +- [CHANGELOG] Polish @oliviertassinari |
| 85 | + |
| 86 | +### core |
| 87 | + |
| 88 | +- [core] Automation for duplicate issues (#878) @oliviertassinari |
| 89 | +- [core] Replace commander with yargs (#872) @dependabot-preview |
| 90 | +- [core] Update monorepo (#884) @oliviertassinari |
| 91 | + |
6 | 92 | ## [4.0.0-alpha.17](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.15...v4.0.0-alpha.17)
|
7 | 93 |
|
8 | 94 | ###### _Jan 14, 2021_
|
|
0 commit comments