MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
Published by DanailH 9 months ago
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
pageSizeOptions
prop (#11992) @pcorpeteval
with new Function
(#11962) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
@mui/[email protected]
isWithinRange
method (#11940) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
reverse
property to axes (#11959) @alexfauquetteAdapterDateFnsV3
on the Getting Started page (#11987) @flaviendelangleChartsTooltip
typo (#11967) @thisisharsh7Localization
documentation sections (#11997) @LukasTyPublished by LukasTy 9 months ago
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights β¨:
π Improve the filtering performance of the Data Grid by changing the GridColDef
methods signatures (#11573) @cherniavskii
π The Line Chart component now has animation by default (#11620) @alexfauquette
π All charts have click handlers (#11411) @alexfauquette
Test their respective documentation demonstrations to know more about the data format:
Big thanks to @giladappsforce and @yaredtsy for their contribution on exploring this feature.
The signature of GridColDef['valueGetter']
has been changed for performance reasons:
- valueGetter: ({ value, row }) => value,
+ valueGetter: (value, row, column, apiRef) => value,
The GridValueGetterParams
interface has been removed:
- const customValueGetter = (params: GridValueGetterParams) => params.row.budget;
+ const customValueGetter: GridValueGetterFn = (value, row) => row.budget;
The signature of GridColDef['valueFormatter']
has been changed for performance reasons:
- valueFormatter: ({ value }) => value,
+ valueFormatter: (value, row, column, apiRef) => value,
The GridValueFormatterParams
interface has been removed:
- const gridDateFormatter = ({ value, field, id }: GridValueFormatterParams<Date>) => value.toLocaleDateString();
+ const gridDateFormatter: GridValueFormatter = (value: Date) => value.toLocaleDateString();
The signature of GridColDef['valueSetter']
has been changed for performance reasons:
- valueSetter: (params) => {
- const [firstName, lastName] = params.value!.toString().split(' ');
- return { ...params.row, firstName, lastName };
- }
+ valueSetter: (value, row) => {
+ const [firstName, lastName] = value!.toString().split(' ');
+ return { ...row, firstName, lastName };
+}
The GridValueSetterParams
interface has been removed:
- const setFullName = (params: GridValueSetterParams) => {
- const [firstName, lastName] = params.value!.toString().split(' ');
- return { ...params.row, firstName, lastName };
- };
+ const setFullName: GridValueSetter<Row> = (value, row) => {
+ const [firstName, lastName] = value!.toString().split(' ');
+ return { ...row, firstName, lastName };
+ }
The signature of GridColDef['valueParser']
has been changed for performance reasons:
- valueParser: (value, params: GridCellParams) => value.toLowerCase(),
+ valueParser: (value, row, column, apiRef) => value.toLowerCase(),
The signature of GridColDef['colSpan']
has been changed for performance reasons:
- colSpan: ({ row, field, value }: GridCellParams) => (row.id === 'total' ? 2 : 1),
+ colSpan: (value, row, column, apiRef) => (row.id === 'total' ? 2 : 1),
The signature of GridColDef['pastedValueParser']
has been changed for performance reasons:
- pastedValueParser: (value, params) => new Date(value),
+ pastedValueParser: (value, row, column, apiRef) => new Date(value),
The signature of GridColDef['groupingValueGetter']
has been changed for performance reasons:
- groupingValueGetter: (params) => params.value.name,
+ groupingValueGetter: (value: { name: string }) => value.name,
@mui/[email protected]
toggleAllMode
prop to the columnsManagement
slot (#10794) @H999GridColDef
methods signatures (#11573) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
The line chart now have animation by default.
You can disable it with skipAnimation
prop.
See animation documentation for more information.
Pie charts onClick
get renamed onItemClick
for consistency with other charts click callback.
@mui/[email protected]
onClick
support (#11411) @alexfauquettePublished by LukasTy 9 months ago
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Published by noraleonte 9 months ago
We are glad to announce MUI X v7 beta!
This version has several improvements, bug fixes, and exciting features π.
We want to offer a big thanks to the 7 contributors who made this release possible β¨:
π Release the Date Time Range Picker component (#9528) @LukasTy
π New column management panel design for the Data Grid (#11770) @MBilalShafi
π Bugfixes
π Documentation improvements
The columns management component has been redesigned and the component was extracted from the ColumnsPanel
which now only serves as a wrapper to display the component above the headers as a panel. As a result, a new slot columnsManagement
and the related prop slotProps.columnsManagement
have been introduced. The props corresponding to the columns management component which were previously passed to the prop slotProps.columnsPanel
should now be passed to slotProps.columnsManagement
. slotProps.columnsPanel
could still be used to override props corresponding to the Panel
component used in ColumnsPanel
which uses Popper
component under the hood.
<DataGrid
slotProps={{
- columnsPanel: {
+ columnsManagement: {
sort: 'asc',
autoFocusSearchField: false,
},
}}
/>
Show all
and Hide all
buttons in the ColumnsPanel
have been combined into one Show/Hide All
toggle in the new columns management component. The related props disableShowAllButton
and disableHideAllButton
have been replaced with a new prop disableShowHideToggle
.
<DataGrid
- disableShowAllButton
- disableHideAllButton
+ disableShowHideToggle
/>
@mui/[email protected]
GridColumnTypes
interface for custom column types (#11742) @cherniavskiiapiRef
early (#11792) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
layout.tabs
class to Tabs
slot (#11781) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
DateTimeRangePicker
component (#9528) @LukasTyDateTimeRangePicker
theme augmentation (#11814) @LukasTycalendars
prop on Mobile
(#11752) @LukasTy@mui/[email protected]
contextValue
to the headless tree view doc (#11705) @flaviendelangledisableSelection
prop (#11821) @flaviendelangleDateTimeRangePicker
in relevant demos (#11815) @LukasTyPublished by noraleonte 9 months ago
We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights β¨:
layout.tabs
class to Tabs
slot (@LukasTy) (#11782)@mui/[email protected]
layout.tabs
class to Tabs
slot (@LukasTy) (#11782)@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
calendars
prop on Mobile
(@LukasTy) (#11771)@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
Published by michelengelen 9 months ago
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights β¨:
SimpleTreeView
customization examples (#11424) @noraleonte@mui/material
peer dependency for all packages (#11692) @LukasTy@mui/material
is now 5.15.0
.The ariaV7
experimental flag has been removed and the Data Grid now uses the improved accessibility implementation by default.
If you were using the ariaV7
flag, you can remove it from the experimentalFeatures
prop:
-<DataGrid experimentalFeatures={{ ariaV7: true }} />
+<DataGrid />
The most notable changes that might affect your application or tests are:
The role="grid"
attribute along with related ARIA attributes are now applied to the inner div
element instead of the root div
element:
-<div class="MuiDataGrid-root" role="grid" aria-colcount="5" aria-rowcount="101" aria-multiselectable="false">
+<div class="MuiDataGrid-root">
<div class="MuiDataGrid-toolbarContainer"></div>
- <div class="MuiDataGrid-main"></div>
+ <div class="MuiDataGrid-main" role="grid" aria-colcount="5" aria-rowcount="101" aria-multiselectable="false"></div>
<div class="MuiDataGrid-footerContainer"></div>
</div>
When the Tree data feature is used, the grid role is now role="treegrid"
instead of role="grid"
.
The Data Grid cells now have role="gridcell"
instead of role="cell"
.
The buttons in toolbar composable components GridToolbarColumnsButton
, GridToolbarFilterButton
, GridToolbarDensity
, and GridToolbarExport
are now wrapped with a tooltip component and have a consistent interface. To override some props corresponding to the toolbar buttons or their corresponding tooltips, you can use the slotProps
prop. Following is an example diff. See Toolbar section for more details.
function CustomToolbar() {
return (
<GridToolbarContainer>
<GridToolbarColumnsButton />
<GridToolbarFilterButton
- title="Custom filter" // π This was previously forwarded to the tooltip component
+ slotProps={{ tooltip: { title: 'Custom filter' } }} // β
This is the correct way now
/>
<GridToolbarDensitySelector
- variant="outlined" // π This was previously forwarded to the button component
+ slotProps={{ button: { variant: 'outlined' } }} // β
This is the correct way now
/>
</GridToolbarContainer>
);
}
Column grouping is now enabled by default. The flag columnGrouping
is no longer needed to be passed to the experimentalFeatures
prop to enable it.
-<DataGrid experimentalFeatures={{ columnGrouping: true }} />
+<DataGrid />
The column grouping API methods getColumnGroupPath
and getAllGroupDetails
are no longer prefixed with unstable_
.
The column grouping selectors gridFocusColumnGroupHeaderSelector
and gridTabIndexColumnGroupHeaderSelector
are no longer prefixed with unstable_
.
The disabled column specific features like hiding
, sorting
, filtering
, pinning
, row grouping
, etc could now be controlled programmatically using initialState
, respective controlled models, or the API object. See the related docs section.
@mui/[email protected]
filterModel.logicOperator
(#11673) @MBilalShaficolumn grouping
feature stable (#11698) @MBilalShafiariaV7
experimental flag (#11428) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
The locales
export has been removed from the root of the packages.
If you were importing locales from the root, be sure to update it:
-import { frFR } from '@mui/x-date-pickers';
+import { frFR } from '@mui/x-date-pickers/locales';
@mui/[email protected]
PickersTextField
and its dependencies public (#11581) @flaviendelanglegetWeekNumber
behavior (#11697) @LukasTylocales
(#11612) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
innerRadius
and outerRadius
to the DOM (#11689) @alexfauquettestackOffset
for LineChart
(#11647) @alexfauquetteThe expandIcon
/ defaultExpandIcon
props, used to expand the children of a node (rendered when it is collapsed),
is now defined as a slot both on the Tree View and the Tree Item components.
If you were using the ChevronRight
icon from @mui/icons-material
,
you can stop passing it to your component because it is now the default value:
-import ChevronRightIcon from '@mui/icons-material/ChevronRight';
<SimpleTreeView
- defaultExpandIcon={<ChevronRightIcon />}
>
{items}
</SimpleTreeView>
If you were passing another icon to your Tree View component,
you need to use the new expandIcon
slot on this component:
<SimpleTreeView
- defaultExpandIcon={<MyCustomExpandIcon />}
+ slots={{ expandIcon: MyCustomExpandIcon }}
>
{items}
</SimpleTreeView>
If you were passing another icon to your Tree Item component,
you need to use the new expandIcon
slot on this component:
<SimpleTreeView>
<TreeItem
nodeId="1"
label="Node 1"
- expandIcon={<MyCustomExpandIcon />}
+ slots={{ expandIcon: MyCustomExpandIcon }}
/>
</SimpleTreeView>
The collapseIcon
/ defaultCollapseIcon
props, used to collapse the children of a node (rendered when it is expanded),
is now defined as a slot both on the Tree View and the Tree Item components.
If you were using the ExpandMore
icon from @mui/icons-material
,
you can stop passing it to your component because it is now the default value:
- import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
<SimpleTreeView
- defaultCollapseIcon={<ExpandMoreIcon />}
>
{items}
</SimpleTreeView>
If you were passing another icon to your Tree View component,
you need to use the new collapseIcon
slot on this component:
<SimpleTreeView
- defaultCollapseIcon={<MyCustomCollapseIcon />}
+ slots={{ collapseIcon: MyCustomCollapseIcon }}
>
{items}
</SimpleTreeView>
If you were passing another icon to your Tree Item component,
you need to use the new collapseIcon
slot on this component:
<SimpleTreeView>
<TreeItem
nodeId="1"
label="Node 1"
- collapseIcon={<MyCustomCollapseIcon />}
+ slots={{ collapseIcon: MyCustomCollapseIcon }}
/>
</SimpleTreeView>
The useTreeItem
hook has been renamed useTreeItemState
.
This will help create a new headless version of the TreeItem
component based on a future useTreeItem
hook.
-import { TreeItem, useTreeItem } from '@mui/x-tree-view/TreeItem';
+import { TreeItem, useTreeItemState } from '@mui/x-tree-view/TreeItem';
const CustomContent = React.forwardRef((props, ref) => {
- const { disabled } = useTreeItem(props.nodeId);
+ const { disabled } = useTreeItemState(props.nodeId);
// Render some UI
});
function App() {
return (
<SimpleTreeView>
<TreeItem ContentComponent={CustomContent} />
</SimpleTreeView>
)
}
The parentIcon
prop has been removed from the Tree View components.
If you were passing an icon to your Tree View component,
you can achieve the same behavior
by passing the same icon to both the collapseIcon
and the expandIcon
slots on this component:
<SimpleTreeView
- defaultParentIcon={<MyCustomParentIcon />}
+ slots={{ collapseIcon: MyCustomParentIcon, expandIcon: MyCustomParentIcon }}
>
{items}
</SimpleTreeView>
The endIcon
/ defaultEndIcon
props, rendered next to an item without children,
is now defined as a slot both on the Tree View and the Tree Item components.
If you were passing an icon to your Tree View component,
you need to use the new endIcon
slot on this component:
<SimpleTreeView
- defaultEndIcon={<MyCustomEndIcon />}
+ slots={{ endIcon: MyCustomEndIcon }}
>
{items}
</SimpleTreeView>
If you were passing an icon to your Tree Item component,
you need to use the new endIcon
slot on this component:
<SimpleTreeView>
<TreeItem
nodeId="1"
label="Node 1"
- endIcon={<MyCustomEndIcon />}
+ slots={{ endIcon: MyCustomEndIcon }}
/>
</SimpleTreeView>
The icon
prop, rendered next to an item without children,
is now defined as a slot on the Tree Item component.
If you were passing an icon to your Tree Item component,
you need to use the new icon
slot on this component:
<SimpleTreeView>
<TreeItem
nodeId="1"
label="Node 1"
- icon={<MyCustomIcon />}
+ slots={{ icon: MyCustomIcon }}
/>
</SimpleTreeView>
@mui/[email protected]
Theme
generic to variants (#11480) @dhulmeuseTreeItem
to useTreeItemState
(#11712) @flaviendelangleslots
and slotProps
on the Tree View components (#11664) @flaviendelanglepageSizeOptions
prop documentation (#11682) @oliviertassinariclassName
prop (#11693) @oliviertassinariSimpleTreeView
customization examples (#11424) @noraleonte@mui/material
peer dependency for all packages (#11692) @LukasTykarma
run in parallel (#11571) @romgrkkarma-parallel
run under a new command (#11716) @romgrkPublished by michelengelen 9 months ago
We'd like to offer a big thanks to the 1 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
arcLabelRadius
property (#11563) @alexfauquetteinnerRadius
and outerRadius
to the DOM (#11719) @alexfauquettestackOffset
for LineChart
(#11703) @alexfauquettePublished by alexfauquette 10 months ago
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights β¨:
AdapterDateFnsV3
.
// with date-fns v2.x
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import de from 'date-fns/locale/de';
// with date-fns v3.x
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
import { de } from 'date-fns/locale/de';
The import path for locales has been changed:
-import { enUS } from '@mui/x-data-grid';
+import { enUS } from '@mui/x-data-grid/locales';
-import { enUS } from '@mui/x-data-grid-pro';
+import { enUS } from '@mui/x-data-grid-pro/locales';
-import { enUS } from '@mui/x-data-grid-premium';
+import { enUS } from '@mui/x-data-grid-premium/locales';
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
[email protected]
adapter (#11462) @LukasTyOpenPickerButton
(#11642) @noraleonteDateRange
to @mui/x-date-pickers-pro/models
(#11611) @flaviendelangle@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
onKeyDown
handler (#11481) @flaviendelanglex-date-pickers-pro
demo adapter imports (#11628) @LukasTygit diff
format @oliviertassinarijsdom
version (#11652) @cherniavskiiPublished by alexfauquette 10 months ago
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights β¨:
AdapterDateFnsV3
.
// with date-fns v2.x
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import de from 'date-fns/locale/de';
// with date-fns v3.x
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
import { de } from 'date-fns/locale/de';
@mui/[email protected]
OpenPickerButton
(#11643) @noraleonte@mui/[email protected]
Same changes as in @mui/[email protected]
.
x-date-pickers-pro
demo adapter imports (#11637) @LukasTyPublished by flaviendelangle 10 months ago
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights β¨:
π New component to create a Tree View from a structured data source:
You can now directly pass your data to the RichTreeView
component instead of manually converting it into JSX TreeItem
components:
const ITEMS = [
{
id: 'node-1',
label: 'Node 1',
children: [
{ id: 'node-1-1', label: Node 1.1' },
{ id: 'node-1-2', label: Node 1.2' },
],
},
{
id: 'node-2',
label: 'Node 2',
},
];
<RichTreeView
items={MUI_X_PRODUCTS}
defaultCollapseIcon={<ExpandMoreIcon />}
defaultExpandIcon={<ChevronRightIcon />}
/>
π Improve Czech (cs-CZ) locale on the Data Grid
π Bugfixes
@mui/[email protected]
hasEval
when disableEval
is set (#11516) @reihwaldautoPageSize
and autoHeight
(#11585) @Sboonnyeval
with new Function
(#11557) @oliviertassinariautoPageSize
is used with autoHeight
(#11554) @Sboonny@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
arcLabelRadius
property (#11487) @alexfauquettenull
in line chart using dataset (#11550) @alexfauquetteThe expansion props have been renamed to better describe their behaviors:
Old name | New name |
---|---|
onNodeToggle |
onExpandedNodesChange |
expanded |
expandedNodes |
defaultExpanded |
defaultExpandedNodes |
<TreeView
- onNodeToggle={handleExpansionChange}
+ onExpandedNodesChange={handleExpansionChange}
- expanded={expandedNodes}
+ expandedNodes={expandedNodes}
- defaultExpanded={defaultExpandedNodes}
+ defaultExpandedNodes={defaultExpandedNodes}
/>
The selection props have been renamed to better describe their behaviors:
Old name | New name |
---|---|
onNodeSelect |
onSelectedNodesChange |
selected |
selectedNodes |
defaultSelected |
defaultSelectedNodes |
<TreeView
- onNodeSelect={handleSelectionChange}
+ onSelectedNodesChange={handleSelectionChange}
- selected={selectedNodes}
+ selectedNodes={selectedNodes}
- defaultSelected={defaultSelectedNodes}
+ defaultSelectedNodes={defaultSelectedNodes}
/>
@mui/[email protected]
items
prop (#11059) @flaviendelangleonNodeExpansionToggle
prop (#11547) @flaviendelanglenext.config.js
(#11514) @oliviertassinariPublished by flaviendelangle 10 months ago
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
hasEval
when disableEval
is set (#11553) @reihwald@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
null
in line chart using dataset (@alexfauquette) (#11561)Published by MBilalShafi 10 months ago
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights β¨:
Date
objects in the filterModel
The filter panel no longer uses the native version of the Select
component for all components.
The getOptionValue
and getOptionLabel
props were removed from the following components:
GridEditSingleSelectCell
GridFilterInputSingleSelect
GridFilterInputMultipleSingleSelect
Use the getOptionValue
and getOptionLabel
properties on the singleSelect
column definition instead:
const column: GridColDef = {
type: 'singleSelect',
field: 'country',
valueOptions: [
{ code: 'BR', name: 'Brazil' },
{ code: 'FR', name: 'France' },
],
getOptionValue: (value: any) => value.code,
getOptionLabel: (value: any) => value.name,
};
The filterModel
now supports Date
objects as values for date
and dateTime
column types.
The filterModel
still accepts strings as values for date
and dateTime
column types,
but all updates to the filterModel
coming from the UI (e.g. filter panel) will set the value as a Date
object.
@mui/[email protected]
checkboxSelection
respect the disableMultipleRowSelection
prop (#11448) @cherniavskiiDate
objects in filter model (#7069) @cherniavskiiSelect
s by default (#11330) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
PickersInput
sizing styles (#11392) @noraleontePickersTextField
standard
and filled
variants (#11250) @noraleontePickersSectionList
(#11449) @flaviendelanglePickersSectionList
(#11352) @flaviendelangle@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
ChartsText
component public (#11370) @alexfauquettefalse
default values for boolean props (#11477) @cherniavskiiname
prop examples (#11422) @LukasTydate-fns
package to v2 in codesandbox (#11463) @LukasTycherry-pick
action (#11446) @LukasTyPublished by MBilalShafi 10 months ago
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
ChartsText
component public (#11370) @alexfauquettename
prop examples (#11442) @LukasTydate-fns
package to v2 in codesandbox (#11478) @LukasTyPublished by MBilalShafi 10 months ago
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights β¨:
instanceId
prop is now required for state selectors.@mui/[email protected]
instanceId
required for state selectors (#11395) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/base
naming.SlotsComponent
suffix has been replaced with Slots
and SlotsComponentsProps
with SlotProps
.- DateCalendarSlotsComponent
+ DateCalendarSlots
- DateCalendarSlotsComponentsProps
+ DateCalendarSlotProps
@mui/[email protected]
@types/react
version (#11397) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
autoFocus
behavior (#11273) @kealjones-wk@mui/[email protected]
@mui/[email protected]
cellSelection
codemod and update migration guide (#11353) @MBilalShafinext
-> master
(#11382) @MBilalShafino-response
workflow (#11369) @MBilalShafiPublished by MBilalShafi 10 months ago
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@types/react
version (#11398) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
autoFocus
behavior (#11376) @kealjones-wkPublished by cherniavskii 11 months ago
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights β¨:
π The scatter charts now use voronoi to trigger items
Users needed to hover the item to highlight the scatter item or show the tooltip.
Now they can interact with data by triggering the closest element. See the docs page for more info.
π Add Pickers FAQ page
π The Data Grid Header filters feature is now stable
π Improve Danish (da-DK) locale on Data Grid
π Bugfixes
The header filters feature is now stable. unstable_
prefix is removed from prop headerFilters
and related exports.
See migration docs for more details.
The GridColDef['type']
has been narrowed down to only accept the built-in column types.
TypeScript users need to use the GridColDef
interface when defining columns:
// π `type` is inferred as `string` and is too wide
const columns = [{ type: 'number', field: 'id' }];
<DataGrid columns={columns} />;
// β
`type` is `'number'`
const columns: GridColDef[] = [{ type: 'number', field: 'id' }];
<DataGrid columns={columns} />;
// β
Alternalively, `as const` can be used to narrow down the type
const columns = [{ type: 'number' as const, field: 'id' }];
<DataGrid columns={columns} />;
@mui/[email protected]
GridColDef['type']
(#11270) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
PickersTextField
(#11258) @flaviendelangleMultiSectionDigitalClock
issues (#11305) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
@mui/utils
as a dependency (#11351) @michelengelenonPaginationModelChange
docs (#10191) @JFBenzsDemoContainer
styling coverage (#11315) @LukasTyPublished by cherniavskii 11 months ago
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
MultiSectionDigitalClock
issues (#11308) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
.
Published by DanailH 11 months ago
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights β¨:
π Support localized start of the week on pickers' AdapterLuxon
When using Luxon 3.4.4 or higher, the start of the week will be defined by the date locale (e.g.: Sunday for en-US
, Monday for fr-FR
).
π Fix a lot of Charts package issues
π The Data Grid features Cell selection and Clipboard paste are now stable
π Improve Bulgarian (bg-BG) locale on Data Grid
π Bugfixes
π Documentation improvements
The clipboard paste feature is now enabled by default. The flag clipboardPaste
is no longer needed to be passed to the experimentalFeatures
prop.
The clipboard-related exports ignoreValueFormatterDuringExport
and splitClipboardPastedText
are no longer prefixed with unstable_
.
The deprecated constants SUBMIT_FILTER_STROKE_TIME
and SUBMIT_FILTER_DATE_STROKE_TIME
have been removed from the DataGrid
exports. Use the filterDebounceMs
prop to customize filter debounce time.
The slots.preferencesPanel
slot and the slotProps.preferencesPanel
prop were removed. Use slots.panel
and slotProps.panel
instead.
The GridPreferencesPanel
component is not exported anymore as it wasn't meant to be used outside of the Data Grid.
The unstable_
prefix has been removed from the cell selection props listed below.
Old name | New name |
---|---|
unstable_cellSelection |
cellSelection |
unstable_cellSelectionModel |
cellSelectionModel |
unstable_onCellSelectionModelChange |
onCellSelectionModelChange |
The unstable_
prefix has been removed from the cell selection API methods listed below.
Old name | New name |
---|---|
unstable_getCellSelectionModel |
getCellSelectionModel |
unstable_getSelectedCellsAsArray |
getSelectedCellsAsArray |
unstable_isCellSelected |
isCellSelected |
unstable_selectCellRange |
selectCellRange |
unstable_setCellSelectionModel |
setCellSelectionModel |
The Quick Filter now ignores hidden columns by default.
See including hidden columns section for more details.
@mui/[email protected]
onFilterModelChange
being fired with stale field value (#11000) @gitstartpreferencesPanel
slot (#11228) @cherniavskii@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
The Date and Time Pickers now use the localized week when using AdapterLuxon
and Luxon v3.4.4 or higher is installed.
This new behavior allows AdapterLuxon
to have the same behavior as the other adapters.
If you want to keep the start of the week on Monday even if your locale says otherwise, you can hardcode the week settings as follows:
The Firefox browser currently does not support this behavior because the getWeekInfo API is not yet implemented.
import { Settings } from 'luxon';
Settings.defaultWeekSettings = {
firstDay: 1,
minimalDays: Info.getMinimumDaysInFirstWeek(),
weekend: [6, 7],
};
Add new parameters to the shortcuts
slot onChange
callback
The onChange
callback fired when selecting a shortcut now requires two new parameters (previously they were optional):
changeImportance
of the shortcut.item
containing the entire shortcut object. const CustomShortcuts = (props) => {
return (
<React.Fragment>
{props.items.map(item => {
const value = item.getValue({ isValid: props.isValid });
return (
<button
- onClick={() => onChange(value)}
+ onClick={() => onChange(value, props.changeImportance ?? 'accept', item)}
>
{value}
</button>
)
}}
</React.Fragment>
)
}
<DatePicker slots={{ shortcuts: CustomShortcuts }} />
AdapterDayjs
with the customParseFormat
plugindayjs.extend(customParseFormatPlugin)
has been moved to the AdapterDayjs
constructor. This allows users to pass custom options to this plugin before the adapter uses it.If you are using this plugin before the rendering of the first LocalizationProvider
component and did not call dayjs.extend
in your own codebase, you will need to manually extend dayjs
:
import dayjs from 'dayjs';
import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
dayjs.extend(customParseFormatPlugin);
The other plugins are still added before the adapter initialization.
@mui/[email protected]
format
parameter (#11130) @LukasTychangeImportance
and shortcut
mandatory in PickersShortcuts
(#10941) @flaviendelanglecustomParseFormat
to constructor (#11151) @michelengelenPickersTextField
styling - outlined variant (#10778) @noraleonteAdapterLuxon
(#10964) @flaviendelangle@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
defaultizeValueFormatter
util to accept an optional series.valueFormatter
value (#11144) @michelengelenlabelStyle
and tickLabelStyle
props on <ChartsYAxis />
(#11180) @akamfoadTextField
styling example to customization playground (#10812) @noraleonteDayCalendar
(#11158) @flaviendelanglenewFeature
flag on v6 features (#11168) @flaviendelangle@mui/system
a direct dependency (#11128) @LukasTyENABLE_AD
env variable (#11181) @oliviertassinariplan: Pro
and plan: Premium
labels on pro/premium issue templates (#10183) @flaviendelanglePublished by LukasTy 11 months ago
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
onFilterModelChange
being fired with stale field value (#11244) @gitstart@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
, plus:
@mui/[email protected]
MultiSectionDigitalClock
number sections (#11297) @LukasTyformat
parameter (#11254) @LukasTy@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
defaultizeValueFormatter
util to accept an optional series.valueFormatter
value (#11213) @michelengelenlabelStyle
and tickLabelStyle
props on <ChartsYAxis />
(#11180) @akamfoadPublished by LukasTy 11 months ago
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights β¨:
@mui/[email protected]
@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
Same changes as in @mui/[email protected]
.
The deprecated shouldDisableClock
prop has been removed in favor of the more flexible shouldDisableTime
prop.
The shouldDisableClock
prop received value
as a number
of hours, minutes, or seconds.
Instead, the shouldDisableTime
prop receives the date object (based on the used adapter).
You can read more about the deprecation of this prop in v6 migration guide.
<DateTimePicker
- shouldDisableClock={(timeValue, view) => view === 'hours' && timeValue < 12}
+ shouldDisableTime={(value, view) => view === 'hours' && value.hour() < 12}
/>
The adapter.dateWithTimezone
method has been removed and its content moved to the date
method.
You can use the adapter.date
method instead:
- adapter.dateWithTimezone(undefined, 'system');
+ adapter.date(undefined, 'system');
The dayPickerClasses
variable has been renamed to dayCalendarClasses
to be consistent with the new name of the DayCalendar
component introduced in v6.0.0.
- import { dayPickerClasses } from '@mui/x-date-pickers/DateCalendar';
+ import { dayCalendarClasses } from '@mui/x-date-pickers/DateCalendar';
The deprecated defaultCalendarMonth
prop has been removed in favor of the more flexible referenceDate
prop.
- <DateCalendar defaultCalendarMonth={dayjs('2022-04-01')};
+ <DateCalendar referenceDate{dayjs('2022-04-01')} />
The adapter.date
method now has the v6 adapter.dateWithTimezone
method behavior.
It no longer accepts any
as a value but only string | null | undefined
.
- adapter.date(new Date());
+ adapter.date();
- adapter.date(new Date('2022-04-17');
+ adapter.date('2022-04-17');
- adapter.date(new Date(2022, 3, 17, 4, 5, 34));
+ adapter.date('2022-04-17T04:05:34');
- adapter.date(new Date('Invalid Date'));
+ adapter.getInvalidDate();
@mui/[email protected]
defaultCalendarMonth
prop (#10987) @flaviendelangleshouldDisableClock
prop (#11042) @flaviendelangledayPickerClasses
variable dayCalendarClasses
(#11140) @flaviendelangleadapter.date
with the current adapter.dateWithTimezone
(#10979) @flaviendelangle@mui/[email protected]
Same changes as in @mui/[email protected]
.
@mui/[email protected]
ChartsTooltip
component setup (#11152) @LukasTy@mui/[email protected]
referenceDate
instead of defaultCalendarMonth
(#11139) @flaviendelangle@mui/x-data-grid-generator
(#11134) @oliviertassinaribabel-plugin-module-resolver
to 5.0.0 (#11065) @flaviendelangle