|
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.30](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.29...v4.0.0-alpha.30) |
| 7 | + |
| 8 | +_May 31, 2021_ |
| 9 | + |
| 10 | +Big thanks to the 8 contributors who made this release possible. Here are some highlights ✨: |
| 11 | + |
| 12 | +- 💅 Add `getCellClassName` prop (#1687) @m4theushw |
| 13 | +- 🐛 Fix a regression in the controlled pagination (#1729) @ZeeshanTamboli |
| 14 | +- ⚡️ Remove `cellClassRules` from `GridColDef` (#1716) @m4theushw |
| 15 | +- 🇨🇿 Add csCZ locale (#1765) @Haaxor1689 |
| 16 | +- 🐞 Bugfixes |
| 17 | + |
| 18 | +### @material-ui/x-grid@v4.0.0-alpha.30 / @material-ui/data-grid@v4.0.0-alpha.30 |
| 19 | + |
| 20 | +#### Breaking changes |
| 21 | + |
| 22 | +- [DataGrid] Rename toolbar components for consistency (#1724) @DanailH |
| 23 | + |
| 24 | + Prefix all the toolbar-related components with `GridToolbar`. |
| 25 | + |
| 26 | + ```diff |
| 27 | + -.MuiDataGridFilterToolbarButton-list |
| 28 | + +.MuiDataGridToolbarFilterButton-list |
| 29 | + ``` |
| 30 | + ```diff |
| 31 | + -<GridColumnsToolbarButton /> |
| 32 | + +<GridToolbarColumnsButton /> |
| 33 | + ``` |
| 34 | + ```diff |
| 35 | + -<GridFilterToolbarButton /> |
| 36 | + +<GridToolbarFilterButton /> |
| 37 | + ``` |
| 38 | + ```diff |
| 39 | + -<GridDensitySelector /> |
| 40 | + +<GridToolbarDensitySelector /> |
| 41 | + ``` |
| 42 | + |
| 43 | +- [DataGrid] Remove `cellClassRules` from `GridColDef` (#1716) @m4theushw |
| 44 | + |
| 45 | + The `GridCellClassParams` type is not exported anymore. Replace it with `GridCellParams`. |
| 46 | + |
| 47 | + ```diff |
| 48 | + -import { GridCellClassParams} from '@material-ui/data-grid'; |
| 49 | + +import { GridCellParams } from '@material-ui/data-grid'; |
| 50 | + |
| 51 | + -cellClassName: (params: GridCellClassParams) => |
| 52 | + +cellClassName: (params: GridCellParams) => |
| 53 | + ``` |
| 54 | + |
| 55 | + The `cellClassRules` in `GridColDef` was removed because it's redundant. The same functionality can be obtained using `cellClassName` and the [`clsx`](https://www.npmjs.com/package/clsx) utility: |
| 56 | + |
| 57 | + ```diff |
| 58 | + +import clsx from 'clsx'; |
| 59 | + |
| 60 | + { |
| 61 | + field: 'age', |
| 62 | + width: 150, |
| 63 | + - cellClassRules: { |
| 64 | + - negative: params => params.value < 0, |
| 65 | + - positive: params => params.value > 0, |
| 66 | + - }, |
| 67 | + + cellClassName: params => clsx({ |
| 68 | + + negative: params.value < 0, |
| 69 | + + positive: params.value > 0, |
| 70 | + + }), |
| 71 | + } |
| 72 | + ``` |
| 73 | + |
| 74 | +- [DataGrid] Fix `onPageChange` doesn't update the `page` when a pagination button is clicked (#1719) @ZeeshanTamboli |
| 75 | + |
| 76 | + Fix naming of `pageChange` and `pageSizeChange` events variables. The correct event variable name should be prefixed with `GRID_` and converted to UPPER_CASE. |
| 77 | + |
| 78 | + ```diff |
| 79 | + -import { GRID_PAGESIZE_CHANGED, GRID_PAGE_CHANGED } from '@material-ui/data-grid'; |
| 80 | + +import { GRID_PAGESIZE_CHANGE, GRID_PAGE_CHANGE } from '@material-ui/data-grid'; |
| 81 | + ``` |
| 82 | + |
| 83 | +- [XGrid] The `getEditCellValueParams` method was removed from the `apiRef` (#1767) @m4theushw |
| 84 | + |
| 85 | + The `getEditCellValueParams` method was almost a straightforward alias of `getEditCellPropsParams`. |
| 86 | + |
| 87 | + ```diff |
| 88 | + -const { value } = apiRef.current.getEditCellValueParams(id, field); |
| 89 | + +const { props: { value } } = apiRef.current.getEditCellPropsParams(id, field); |
| 90 | + ``` |
| 91 | + |
| 92 | +#### Changes |
| 93 | + |
| 94 | +- [DataGrid] Add `getCellClassName` prop (#1687) @m4theushw |
| 95 | +- [DataGrid] Add customizable `aria-label`, `aria-labelledby` field (#1764) @ZeeshanTamboli |
| 96 | +- [DataGrid] Add Czech (csCZ) locale and fix plural rules in Slovak (skSK) locale (#1765) @Haaxor1689 |
| 97 | +- [DataGrid] Fix cell accessibility aria-colindex (#1669) @ZeeshanTamboli |
| 98 | +- [DataGrid] Fix changing rows per page size (#1729) @ZeeshanTamboli |
| 99 | +- [DataGrid] Fix date operators not working with date-time values (#1722) @m4theushw |
| 100 | +- [DataGrid] Fix `rowCount` prop updates (#1697) @dtassone |
| 101 | +- [DataGrid] Improve German (deDe) translation of "errorOverlayDefaultLabel" (#1718) @sebastianfrey |
| 102 | +- [DataGrid] Fix accessibility of the filter panel textboxes (#1727) @m4theushw |
| 103 | +- [XGrid] Fix `onFilterModelChange` not firing (#1706) @dtassone |
| 104 | + |
| 105 | +### Docs |
| 106 | + |
| 107 | +- [docs] Fix outdated description of `GridRowParams.getValue` (#1731) @visshaljagtap |
| 108 | +- [docs] Fix 404 link (#1752) @oliviertassinari |
| 109 | +- [docs] Improve Custom edit component demo (#1750) @oliviertassinari |
| 110 | +- [docs] Remove redundant customizable pagination section (#1774) @ZeeshanTamboli |
| 111 | +- [docs] Improve `GridApi` descriptions (#1767) @m4theushw |
| 112 | + |
| 113 | +### Core |
| 114 | + |
| 115 | +- [core] Batch updates of storybook (#1751) @oliviertassinari |
| 116 | +- [core] Help support different documents (#1754) @oliviertassinari |
| 117 | +- [core] Upgrade Material-UI core v5 to latest version (#1763) @ZeeshanTamboli |
| 118 | +- [test] Reduce flakiness (#1753) @oliviertassinari |
| 119 | +- [test] Remove skip on Edge (#1708) @m4theushw |
| 120 | + |
6 | 121 | ## [4.0.0-alpha.29](https://github.com/mui-org/material-ui-x/compare/v4.0.0-alpha.28...v4.0.0-alpha.29)
|
7 | 122 |
|
8 | 123 | _May 19, 2021_
|
|
0 commit comments