v6.0.0-beta.0
Jan 20, 2023
After a long period in alpha, we're glad to announce the first MUI X v6 beta!
We encourage you to try out this version, packed with improvements, bug fixes, and a few highlighted features ✨:
Data Grid
- Access to the API Object in the community version
- Improved column menu
- Cell selection range (Premium)
Date and Time pickers
- Fields: the new default input for pickers.
- Improved layout customization
- Edit date ranges with drag and drop (Pro)
You can check the migration guides for the Data Grid and Date Pickers in the documentation.
We'd like to offer a big thanks to the 10 contributors who made this release possible.
- ✨ Merge
pageandpageSizeprops intopaginationModel - 🚀 Replace old masked picker components with field based ones
- 🌍 Improve Swedish (sv-SE) and Italian (it-IT) locales
- 📚 Documentation improvements
- 🐞 Bug fixes
@mui/x-data-grid@v6.0.0-beta.0 / @mui/x-data-grid-pro@v6.0.0-beta.0 / @mui/x-data-grid-premium@v6.0.0-beta.0
Breaking changes
-
The
disableExtendRowFullWidthprop was removed.
UseshowCellVerticalBorderorshowColumnVerticalBorderprops to show or hide right border for cells and header cells respectively. -
The
GridCellIdentifiertype was removed. UseGridCellCoordinatesinstead. -
The
singleSelectcolumn type now has a default value formatter that returns thelabelcorresponding to the selected value whenvalueOptionsis an array of objects.
As consequence, any existing value formatter will not be applied to the individual options anymore, but only to the text of the cell.
It is recommended to migratevalueOptionsto an array of objects to be able to add a custom label for each value.
To override the label used for each option when the cell is in edit mode or in the filter panel, the following components now support agetOptionLabelprop.
This prop accepts a callback that is called with the item fromvalueOptionsand must return the new label.GridEditSingleSelectCellGridFilterInputSingleSelectGridFilterInputMultipleSingleSelect
-
The
getGridSingleSelectQuickFilterFnfunction was removed.
You can copy the old function and pass it to thegetApplyQuickFilterFnproperty of thesingleSelectcolumn definition. -
The
pageandpageSizeprops and their respective event handlersonPageChangeandonPageSizeChangewere removed.
UsepaginationModelandonPaginationModelChangeinstead.<DataGrid rows={rows} columns={columns} - page={page} - pageSize={pageSize} - onPageChange={handlePageChange} - onPageSizeChange={handlePageSizeChange} + paginationModel={{ page, pageSize }} + onPaginationModelChange={handlePaginationModelChange} /> -
The properties
initialState.pagination.pageandinitialState.pagination.pageSizewere also removed.
UseinitialState.pagination.paginationModelinstead.-initialState={{ pagination: { page: 1, pageSize: 10 } }} +initialState={{ pagination: { paginationModel: { page: 1, pageSize: 10 } } }}
-
The
rowsPerPageOptionsprop was renamed topageSizeOptions.-<DataGrid rowsPerPageOptions={[10, 20, 50]} /> +<DataGrid pageSizeOptions={[10, 20, 50]} />
-
The
errorandonErrorprops were removed - the grid no longer catches errors during rendering.
To catch errors that happen during rendering use the error boundary. -
The
components.ErrorOverlayslot was removed. -
The
GridErrorOverlaycomponent was removed. -
The
componentErrorevent was removed.
Use the error boundary to catch errors thrown during rendering. -
The
apiRef.current.showErrormethod was removed.
The UI for errors is no longer handled by the grid. -
The
dateanddateTimecolumns now only supportDateobjects as values.
To parse a string value, use thevalueGetter:<DataGrid columns={[ { field: 'date', type: 'date', valueGetter: (params) => new Date(params.value), }, ]} />
-
The following selectors have been renamed:
gridVisibleSortedRowIdsSelectorrenamed togridExpandedSortedRowIdsSelectorgridVisibleSortedRowEntriesSelectorrenamed togridExpandedSortedRowEntriesSelectorgridVisibleRowCountSelectorrenamed togridExpandedRowCountSelectorgridVisibleSortedTopLevelRowEntriesSelectorrenamed togridFilteredSortedTopLevelRowEntriesSelectorgridVisibleTopLevelRowCountSelectorrenamed togridFilteredTopLevelRowCountSelector
-
The
apiRef.current.getVisibleRowModelsmethod was removed. Use thegridVisibleSortedRowEntriesSelectorselector instead. -
The
GridRowScrollEndParams["virtualRowsCount"]parameter was renamed toGridRowScrollEndParams["visibleRowsCount"].
Changes
- [DataGrid] Add default value formatter to
singleSelect(#7290) @m4theushw - [DataGrid] Fix flickering on grid scroll (#7549) @cherniavskii
- [DataGrid] Merge
pageandpageSizeprops intopaginationModel(#7147) @MBilalShafi - [DataGrid] Only support
Dateas value indateanddateTimecolumn types (#7594) @cherniavskii - [DataGrid] Remove error boundary (#7579) @cherniavskii
- [DataGrid] Remove
GridCellIdentifierredundant type (#7578) @MBilalShafi - [DataGrid] Remove
disableExtendRowFullWidthprop (#7373) @MBilalShafi - [DataGrid] Remove tag limit from
isAnyOfoperator input (#7592) @m4theushw - [DataGrid] Use v6 terminology (#7473) @DanailH
- [DataGridPremium] Keep focus on first selected cell (#7482) @m4theushw
- [l10n] Update Swedish (sv-SE) locale (#7585) @MaanTyringe
@mui/x-date-pickers@v6.0.0-beta.0 / @mui/x-date-pickers-pro@v6.0.0-beta.0
Breaking changes
-
The
showToolbarprop has been moved to thetoolbarcomponent slot props:<DatePicker - showToolbar + slotProps={{ + toolbar: { + hidden: false, + } + }} />
-
The new pickers have replaced the legacy one.
If you were using the new pickers with their temporary name, you just have to change your imports.
-import { Unstable_NextDatePicker as NextDatePicker } from '@mui/x-date-pickers/NextDatePicker'; +import { DatePicker } from '@mui/x-date-pickers/DatePicker'; -import { Unstable_DesktopNextDatePicker as DesktopNextDatePicker } from '@mui/x-date-pickers/DesktopNextDatePicker'; +import { DesktopDatePicker } from '@mui/x-date-pickers/DesktopDatePicker'; // Same for all the other pickers with an `Unstable_` prefix
If you were still using the legacy picker (
DatePicker,DesktopDatePicker, ...), please take a look at our migration guide for detailed explanations on how to start using the new ones. -
The fields components are no longer unstable
-import { Unstable_DateField as DateField } from '@mui/x-date-pickers/DateField'; +import { DateField } from '@mui/x-date-pickers/DateField';
Changes
- [DateRangeCalendar] Ignore
calendarsprop on mobile (#7526) @flaviendelangle - [DateRangeCalendar] Ignore
showDaysOutsideCurrentMonthwhencalendars > 1(#7529) @flaviendelangle - [DateRangePicker] Propagate
rangePositionto view (#7602) @LukasTy - [fields] Fix upper boundary on 12-hours sections (#7618) @flaviendelangle
- [fields] Publish value when cleaning the last section of a date (#7519) @flaviendelangle
- [fields] Remove the
Unstable_prefix for field components (#7185) @flaviendelangle - [pickers] Add missing
slotsandslotPropson the date range view renderer (#7586) @flaviendelangle - [pickers] Drop legacy pickers (#7545) @flaviendelangle
- [pickers] Fix day calendar row and column index (#7589) @LukasTy
- [pickers] Go to the default view when opening a picker (#7484) @flaviendelangle
- [pickers] Make sure the
classNameandsxprops are applied to the field / static root of the picker and never to the view (#7600) @flaviendelangle - [pickers] Rename new pickers (#7575) @flaviendelangle
- [pickers] Rename remaining
componentsandcomponentSlotsreferences (#7576) @LukasTy - [pickers] Replace
showToolbarwith toolbar slothiddenprop (#7498) @LukasTy - [pickers] Spread props to the DOM in
DateCalendarandTimeClock(#7587) @flaviendelangle - [pickers] Stop using the
WrapperVariantContextinDateRangeCalendar(#7488) @flaviendelangle - [l10n] Improve Italian (it-IT) locale (#7582) @marikadeveloper
@mui/x-codemod@v6.0.0-beta.0
Changes
- [codemod] Remove
disableExtendRowFullWidthprop (#7508) @MBilalShafi
Docs
- [docs] Clean-up the
field componentspage (#7605) @flaviendelangle - [docs] List all pickers toolbar pages in api docs side menu (#7577) @LukasTy
- [docs] Remove "Flex layout" docs section and demo (#7477) @cherniavskii
- [docs] Rework the pickers "Getting Started" page (#7140) @flaviendelangle
Core
- [core] Add missing
status: needs triagelabel on RFC @oliviertassinari - [core] Add release documentation step detailing
x-codemodpackage tag change (#7617) @LukasTy - [core] Fix typo in
CHANGELOG(#7611) @flaviendelangle - [test] Fix date range picker tests to work with western time zones (#7581) @m4theushw