Skip to content

v4.0.0-alpha.30

Compare
Choose a tag to compare
@dtassone dtassone released this 31 May 08:20
· 5459 commits to master since this release
0c189f7

May 31, 2021

Big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:

@material-ui/x-grid@v4.0.0-alpha.30 / @material-ui/data-grid@v4.0.0-alpha.30

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 from GridColDef (#1716) @m4theushw

    The GridCellClassParams type is not exported anymore. Replace it with GridCellParams.

    -import { GridCellClassParams} from '@material-ui/data-grid';
    +import { GridCellParams } from '@material-ui/data-grid';
    
    -cellClassName: (params: GridCellClassParams) =>
    +cellClassName: (params: GridCellParams) =>

    The cellClassRules in GridColDef was removed because it's redundant. The same functionality can be obtained using cellClassName and the clsx 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 the page when a pagination button is clicked (#1719) @ZeeshanTamboli

    Fix naming of pageChange and pageSizeChange events variables. The correct event variable name should be prefixed with GRID_ 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 the apiRef (#1767) @m4theushw

    The getEditCellValueParams method was almost a straightforward alias of getEditCellPropsParams.

    -const { value } = apiRef.current.getEditCellValueParams(id, field);
    +const { props: { value } } = apiRef.current.getEditCellPropsParams(id, field);

Changes

Docs

Core