v8.0.0-alpha.13
Pre-releaseWe'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
- 📊 Decouple
margin
andaxis-size
. A new API to support multiple axes (#16418) @JCQuintas - 🗺️ Added Bangla (bn-BD) locale
- 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
Special thanks go out to the community members for their contributions:
@denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
Following are all team members who have contributed to this release:
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
Data Grid
Breaking changes
-
The
slots.baseFormControl
component was removed. -
The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
- If an initial
columnVisibilityModel
is provided, it resets to that model. - If a controlled
columnVisibilityModel
is provided, it resets to the first model value. - When the columns are updated (via the
columns
prop orupdateColumns()
API method), the reset reference point updates to the currentcolumnVisibilityModel
.
To revert to the previous behavior, provide a custom component to the
slots.columnsManagement
. - If an initial
-
The deprecated
LicenseInfo
export has been removed from the@mui/x-data-grid-pro
and@mui/x-data-grid-premium
packages.
You have to import it from@mui/x-license
instead:- import { LicenseInfo } from '@mui/x-data-grid-pro'; - import { LicenseInfo } from '@mui/x-data-grid-premium'; + import { LicenseInfo } from '@mui/x-license'; LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
-
The row selection model has been changed from
GridRowId[]
to{ type: 'include' | 'exclude'; ids: Set<GridRowId> }
.
UsingSet
allows for a more efficient row selection management.
Theexclude
selection type allows to select all rows except the ones in theids
set.This change impacts the following props:
rowSelectionModel
onRowSelectionModelChange
initialState.rowSelectionModel
- const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]); + const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
This change also impacts the
gridRowSelectionStateSelector
selector.
For convenience, use thegridRowSelectionManagerSelector
selector to handle both selection types:- const rowSelection = gridRowSelectionStateSelector(apiRef); - const isRowSelected = rowSelection.includes(rowId); + const rowSelectionManager = gridRowSelectionManagerSelector(apiRef); + const isRowSelected = rowSelectionManager.has(rowId);
There is also a
createRowSelectionManager
utility function that can be used to manage the row selection:const rowSelectionManager = createRowSelectionManager({ type: 'include', ids: new Set(), }); rowSelectionManager.select(rowId); rowSelectionManager.unselect(rowId); rowSelectionManager.has(rowId);
-
The
selectedIdsLookupSelector
selector has been removed. Use thegridRowSelectionManagerSelector
orgridRowSelectionStateSelector
selectors instead. -
The
selectedGridRowsSelector
has been renamed togridRowSelectionIdsSelector
. -
The
selectedGridRowsCountSelector
has been renamed togridRowSelectionCountSelector
. -
The data source feature and its related props are now stable.
<DataGridPro - unstable_dataSource={dataSource} - unstable_dataSourceCache={cache} - unstable_lazyLoading - unstable_lazyLoadingRequestThrottleMs={100} + dataSource={dataSource} + dataSourceCache={cache} + lazyLoading + lazyLoadingRequestThrottleMs={100} />
-
The data source API is now stable.
- apiRef.current.unstable_dataSource.getRows() + apiRef.current.dataSource.getRows()
-
The signature of
unstable_onDataSourceError()
has been updated to support future use-cases.<DataGrid - unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => { - if (params.filterModel) { - // do something - } - }} + unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => { + if (error instanceof GridGetRowsError && error.params.filterModel) { + // do something + } + }} />
-
Fix the type of the
GridSortModel
to allow readonly arrays. -
GridSortItem
interface is not exported anymore. -
The
showToolbar
prop is now required to display the toolbar.It is no longer necessary to pass
GridToolbar
as a slot to display the default toolbar.<DataGrid + showToolbar - slots={{ - toolbar: GridToolbar, - }} />
@mui/[email protected]
- [DataGrid] Add
showToolbar
prop to enable default toolbar (#16687) @KenanYusuf - [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
- [DataGrid] Column management design updates (#16630) @KenanYusuf
- [DataGrid] Fix
showColumnVerticalBorder
prop (#16715) @KenanYusuf - [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
- [DataGrid] Fix: base
Select
menupropsonClose()
(#16643) @romgrk - [DataGrid] Make
GridSortItem
internal (#16732) @arminmeh - [DataGrid] Make data source stable (#16710) @MBilalShafi
- [DataGrid] Reshape row selection model (#15651) @cherniavskii
- [DataGrid] Replace
sx
prop usage withstyled()
components (#16665) @KenanYusuf - [DataGrid] Refactor: create base
Autocomplete
(#16390) @romgrk - [DataGrid] Refactor: remove base form control (#16634) @romgrk
- [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
- [DataGrid] Refactor: remove material containers (#16633) @romgrk
- [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
- [DataGrid] Update the signature of the
onDataSourceError()
callback (#16718) @MBilalShafi - [DataGrid] Use readonly array for the
GridSortModel
(#16627) @pcorpet - [DataGrid] Fix the popper focus trap (#16736) @romgrk
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
- [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
- [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
@mui/[email protected]

Same changes as in @mui/[email protected]
, plus:
- [DataGridPro] Remove
LicenseInfo
reexports (#16671) @cherniavskii
@mui/[email protected]

Same changes as in @mui/[email protected]
, plus:
- [DataGridPremium] Use
valueGetter
to get row group keys (#16016) @cherniavskii
Date and Time Pickers
Breaking changes
- The
<DateRangePicker />
now uses adialog
instead of atooltip
to render their view when used with a single input range field.
@mui/[email protected]
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
- [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
- [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
- [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
- [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
@mui/[email protected]

Same changes as in @mui/[email protected]
.
Charts
Breaking changes
-
Charts array inputs are now
readonly
. Allowing externally definedas const
to be used as a prop value of the React component.const xAxis = [{ position: 'bottom' }] as const <BarChart xAxis={xAxis} />
-
Replace
topAxis
,rightAxis
,bottomAxis
andleftAxis
props by theposition
property in the axis config.
If you were using them to place axis, set theposition
property to the corresponding value'top' | 'right' | 'bottom' | 'left'
.
If you were disabling an axis by setting it tonull
, set itsposition
to'none'
.<LineChart yAxis={[ { scaleType: 'linear', + position: 'right', }, ]} series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]} height={400} - rightAxis={{}} />
-
Remove
position
prop fromChartsXAxis
andChartsYAxis
.
Theposition
prop has been removed from theChartsXAxis
andChartsYAxis
components. Configure it directly in the axis config.<ChartContainer yAxis={[ { id: 'my-axis', + position: 'right', }, ]} > - <ChartsYAxis axisId="my-axis" position="right" /> + <ChartsYAxis axisId="my-axis" /> </ChartContainer>
-
Add
minTickLabelGap
to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
@mui/[email protected]
- [charts] Accept component in
labelMarkType
(#16739) @bernardobelchior - [charts] Add
minTickLabelGap
to x-axis (#16548) @bernardobelchior - [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
- [charts] Decouple
margin
andaxis-size
(#16418) @JCQuintas - [charts] Display slider tooltip on demos (#16723) @JCQuintas
- [charts] Fix composition docs link (#16761) @bernardobelchior
- [charts] Fix default label measurement being off (#16635) @bernardobelchior
- [charts] Fix is highlighted memoization (#16592) @alexfauquette
- [charts] Fix missing
theme.shape
error in the tooltip (#16748) @alexfauquette - [charts] Fix typo in error message (#16641) @JCQuintas
- [charts] Improve axis size docs (#16673) @JCQuintas
- [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
- [charts] Make
defaultizeAxis
function type-safe (#16642) @JCQuintas - [charts] Make
series.data
readonly (#16645) @JCQuintas - [charts] Migrate
ChartsUsageDemo
to TSX and removed NoSnap (#16686) @JCQuintas - [charts] Prevent
position='none'
axes from rendering (#16727) @JCQuintas - [charts] Make array inputs readonly (#16632) @JCQuintas
- [charts] Remove state initialization hack (#16520) @alexfauquette
- [charts] Remove redundant default axis (#16734) @bernardobelchior
@mui/[email protected]

Same changes as in @mui/[email protected]
, plus:
- [charts-pro] Add back zoom control (#16550) @alexfauquette
Tree View
@mui/[email protected]
Internal changes.
@mui/[email protected]

Same changes as in @mui/[email protected]
.
@mui/[email protected]
- [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
- [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
Docs
- [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
- [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
- [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
- [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
- [docs] Improve Pickers migration page (#16682) @LukasTy
- [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
- [code-infra] Charts changes for
vitest
(#16755) @JCQuintas - [code-infra] General packages changes for
vitest
(#16757) @JCQuintas - [code-infra] Native Node.js ESM (#16603) @Janpot
- [infra] Update contributor acknowledgment wording (#16751) @michelengelen
- [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
- [x-license] Introduce usage telemetry (#13530) @hasdfa