v4.0.0-alpha.30
May 31, 2021
Big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
- 💅 Add
getCellClassName
prop (#1687) @m4theushw - 🐛 Fix a regression in the controlled pagination (#1729) @ZeeshanTamboli
- ⚡️ Remove
cellClassRules
fromGridColDef
(#1716) @m4theushw - 🇨🇿 Add csCZ locale (#1765) @Haaxor1689
- 🐞 Bugfixes
@material-ui/[email protected] / @material-ui/[email protected]
Breaking changes
-
[DataGrid] Rename toolbar components for consistency (#1724) @DanailH
Prefix all the toolbar-related components with
GridToolbar
.-.MuiDataGridFilterToolbarButton-list +.MuiDataGridToolbarFilterButton-list
-<GridColumnsToolbarButton /> +<GridToolbarColumnsButton />
-<GridFilterToolbarButton /> +<GridToolbarFilterButton />
-<GridDensitySelector /> +<GridToolbarDensitySelector />
-
[DataGrid] Remove
cellClassRules
fromGridColDef
(#1716) @m4theushwThe
GridCellClassParams
type is not exported anymore. Replace it withGridCellParams
.-import { GridCellClassParams} from '@material-ui/data-grid'; +import { GridCellParams } from '@material-ui/data-grid'; -cellClassName: (params: GridCellClassParams) => +cellClassName: (params: GridCellParams) =>
The
cellClassRules
inGridColDef
was removed because it's redundant. The same functionality can be obtained usingcellClassName
and theclsx
utility:+import clsx from 'clsx'; { field: 'age', width: 150, - cellClassRules: { - negative: params => params.value < 0, - positive: params => params.value > 0, - }, + cellClassName: params => clsx({ + negative: params.value < 0, + positive: params.value > 0, + }), }
-
[DataGrid] Fix
onPageChange
doesn't update thepage
when a pagination button is clicked (#1719) @ZeeshanTamboliFix naming of
pageChange
andpageSizeChange
events variables. The correct event variable name should be prefixed withGRID_
and converted to UPPER_CASE.-import { GRID_PAGESIZE_CHANGED, GRID_PAGE_CHANGED } from '@material-ui/data-grid'; +import { GRID_PAGESIZE_CHANGE, GRID_PAGE_CHANGE } from '@material-ui/data-grid';
-
[XGrid] The
getEditCellValueParams
method was removed from theapiRef
(#1767) @m4theushwThe
getEditCellValueParams
method was almost a straightforward alias ofgetEditCellPropsParams
.-const { value } = apiRef.current.getEditCellValueParams(id, field); +const { props: { value } } = apiRef.current.getEditCellPropsParams(id, field);
Changes
- [DataGrid] Add
getCellClassName
prop (#1687) @m4theushw - [DataGrid] Add customizable
aria-label
,aria-labelledby
field (#1764) @ZeeshanTamboli - [DataGrid] Add Czech (csCZ) locale and fix plural rules in Slovak (skSK) locale (#1765) @Haaxor1689
- [DataGrid] Fix cell accessibility aria-colindex (#1669) @ZeeshanTamboli
- [DataGrid] Fix changing rows per page size (#1729) @ZeeshanTamboli
- [DataGrid] Fix date operators not working with date-time values (#1722) @m4theushw
- [DataGrid] Fix
rowCount
prop updates (#1697) @dtassone - [DataGrid] Improve German (deDe) translation of "errorOverlayDefaultLabel" (#1718) @sebastianfrey
- [DataGrid] Fix accessibility of the filter panel textboxes (#1727) @m4theushw
- [XGrid] Fix
onFilterModelChange
not firing (#1706) @dtassone
Docs
- [docs] Fix outdated description of
GridRowParams.getValue
(#1731) @visshaljagtap - [docs] Fix 404 link (#1752) @oliviertassinari
- [docs] Improve Custom edit component demo (#1750) @oliviertassinari
- [docs] Remove redundant customizable pagination section (#1774) @ZeeshanTamboli
- [docs] Improve
GridApi
descriptions (#1767) @m4theushw
Core
- [core] Batch updates of storybook (#1751) @oliviertassinari
- [core] Help support different documents (#1754) @oliviertassinari
- [core] Upgrade Material-UI core v5 to latest version (#1763) @ZeeshanTamboli
- [test] Reduce flakiness (#1753) @oliviertassinari
- [test] Remove skip on Edge (#1708) @m4theushw