Aug 27, 2021
🎉 This is the first stable release of the data grid component 🎉!
We have been iterating on the component for 18 months. With the introduction of the row edit feature, many bug fixes, and polishing of the documentation, we believe the component is ready for a stable release.
The MUI X v4.0.0 release supports MUI Core v4 and has partial support for v5-beta. With the soon-to-be-released v5 version of the core components, we are moving ongoing work to the v5 release line (Core and X).
The support for existing projects on MUI v4 won't be a priority going forward. We encourage you to migrate to MUI Core v5-beta and soon MUI X v5-beta. We don't patch, fix, or alter older versions. Using MUI Core v4 with MUI X v5 might lead to extra bundle size and configuration.
A big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
-
🚀 Introduce the row editing feature (#2098) @m4theushw
-
⚡️ Rename the
XGrid
component toDataGridPro
(#2382) @m4theushwThis should help clarify the products vs. plans separation. MUI X is a product line on its own. It contains MIT and Commercial software. Removing X from the name of the paid components should help remove a possible confusion: the MIT version of X is meant to be valuable enough for developers to use it, without feeling that it's crippled compared to other OSS alternatives.
The Pro suffix should help make it clear what's MIT and what's not. -
✨ Rename the
@material-ui
npm scope to@mui
(#2341) @oliviertassinariThis is part of the ongoing rebranding of the project and company. Material-UI is our current official name, however, we are going to change it. It's too long to write, read, and pronounce; and it is too closely associated with Material Design. In the near future, the whole project/company is moving to MUI and https://mui.com/.
-
💡 The
api
property was removed from the callback params. To access the API, use theDataGridPro
(#2312) @DanailH
@mui/x-data-grid@v4.0.0
/ @mui/x-data-grid-pro@v4.0.0
Breaking changes
-
[DataGrid] Move packages to
@mui
scope and renameXGrid
toDataGridPro
(#2341, #2382) @m4theushw @oliviertassinari
You can find in the above highlight section why we are making these name changes. You can migrate following these steps:-import { DataGrid } from '@material-ui/data-grid'; +import { DataGrid } from '@mui/x-data-grid';
-import { XGrid } from '@material-ui/x-grid'; -<XGrid /> +import { DataGridPro } from '@mui/x-data-grid-pro'; +<DataGridPro />
-
[DataGrid] The
api
property was removed from the callback params (#2312) @DanailH
To access the API, use theDataGridPro
and get it from the newdetails
param.<DataGridPro - onColumnResize={(params, event) => console.log(params.api)} + onColumnResize={(params, event, details) => console.log(details.api)} />
-
[DataGrid] Remove unused row CSS classes (#2327) @ZeeshanTamboli
The CSS classes.Mui-odd
and.Mui-even
were removed from the row.
Changes
- [DataGrid] Add
gridClasses
API instead of hard coded classes (#2320) @m4theushw - [DataGrid] Add row editing feature (#2098) @m4theushw
- [DataGrid] Add TypeScript module augmentation for the theme (#2307) @ZeeshanTamboli
- [DataGrid] Fix
box-sizing: border-box
leak (#2330) @m4theushw - [DataGrid] Fix keyboard navigation header regression (#2342) @oliviertassinari
- [DataGrid] Fix keyboard navigation on filtered rows (#2336) @m4theushw
Docs
- [docs] Add
Row & Cell editing
in features list (#2396) @ZeeshanTamboli - [docs] Add redirect from
XGrid
toDataGridPro
(#2389) @m4theushw - [docs] Fix
onCellEditCommit
param type (#2390) @ArthurPedroti - [docs] Fix docs for
onEditRowsModelChange
prop (#2394) @ZeeshanTamboli - [docs] Fix docs links and pagination sentence (#2381) @ZeeshanTamboli
- [docs] Update the icons for the new branding (#2339) @oliviertassinari
Core
- [core] Keep prop-types in the same file (#2345) @oliviertassinari
- [core] Reduce
options
internal usage (#2318) @flaviendelangle - [core] Remove
DataGridPropTypes
(#2432) @flaviendelangle - [core] Remove private API from the export (#2299) @oliviertassinari
- [core] Remove usages of
options.scrollbarSize
(#2317) @flaviendelangle - [core] Simplify
useGridColumns
hook (#2343) @oliviertassinari - [core] Update
doesSupportTouchActionNone
implementation (#2378) @DanailH - [core] Upgrade dependency with the monorepo (#2377) @oliviertassinari
- [test] Use
.not.to.equal
in favour ofto.not.equal
(#2340) @oliviertassinari