Releases: mui/mui-x
v7.0.0-alpha.3
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 forfr-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
Data Grid
Breaking changes
-
The clipboard paste feature is now enabled by default. The flag
clipboardPaste
is no longer needed to be passed to theexperimentalFeatures
prop. -
The clipboard-related exports
ignoreValueFormatterDuringExport
andsplitClipboardPastedText
are no longer prefixed withunstable_
. -
The deprecated constants
SUBMIT_FILTER_STROKE_TIME
andSUBMIT_FILTER_DATE_STROKE_TIME
have been removed from theDataGrid
exports. Use thefilterDebounceMs
prop to customize filter debounce time. -
The
slots.preferencesPanel
slot and theslotProps.preferencesPanel
prop were removed. Useslots.panel
andslotProps.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/x-data-grid@7.0.0-alpha.3
- [DataGrid] Fix cell editing by adding a leading "v" on paste (#9205) @prasad5795
- [DataGrid] Exclude hidden columns from quick filtering by default (#11229) @cherniavskii
- [DataGrid] Fix
onFilterModelChange
being fired with stale field value (#11000) @gitstart - [DataGrid] Fix handling of event target in portal (#11174) @cherniavskii
- [DataGrid] Remove deprecated constants (#11233) @michelengelen
- [DataGrid] Remove the
preferencesPanel
slot (#11228) @cherniavskii - [l10n] Improve Bulgarian (bg-BG) locale (#10856) @Kristiqn95
@mui/x-data-grid-pro@7.0.0-alpha.3
Same changes as in @mui/x-data-grid@7.0.0-alpha.3
.
@mui/x-data-grid-premium@7.0.0-alpha.3
Same changes as in @mui/x-data-grid-pro@7.0.0-alpha.3
, plus:
- [DataGridPremium] Fix aggregated column ignoring column definition changes (#11129) @cherniavskii
- [DataGridPremium] Make Cell selection feature stable (#11246) @MBilalShafi
- [DataGridPremium] Make Clipboard paste feature stable (#11248) @MBilalShafi
Date Pickers
Breaking changes
-
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 allowsAdapterLuxon
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
slotonChange
callbackThe
onChange
callback fired when selecting a shortcut now requires two new parameters (previously they were optional):- The
changeImportance
of the shortcut. - The
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 }} />
- Usage of
AdapterDayjs
with thecustomParseFormat
plugin
The call todayjs.extend(customParseFormatPlugin)
has been moved to theAdapterDayjs
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 calldayjs.extend
in your own codebase, you will need to manually extenddayjs
:import dayjs from 'dayjs'; import customParseFormatPlugin from 'dayjs/plugin/customParseFormat'; dayjs.extend(customParseFormatPlugin);
The other plugins are still added before the adapter initialization.
- The
@mui/x-date-pickers@7.0.0-alpha.3
- [pickers] Expand field placeholder methods flexibility by providing
format
parameter (#11130) @LukasTy - [pickers] Make
changeImportance
andshortcut
mandatory inPickersShortcuts
(#10941) @flaviendelangle - [pickers] Moved extend with
customParseFormat
to constructor (#11151) @michelengelen - [pickers] POC:
PickersTextField
styling - outlined variant (#10778) @noraleonte - [pickers] Support localized start of the week on
AdapterLuxon
(#10964) @flaviendelangle - [pickers] Use adapter methods instead of date library ones whenever possible (#11142) @flaviendelangle
@mui/x-date-pickers-pro@7.0.0-alpha.3
Same changes as in @mui/x-date-pickers@7.0.0-alpha.3
.
Charts / @mui/x-charts@7.0.0-alpha.3
- [charts] Adjusted
defaultizeValueFormatter
util to accept an optionalseries.valueFormatter
value (#11144) @michelengelen - [charts] Apply
labelStyle
andtickLabelStyle
props on<ChartsYAxis />
(#11180) @akamfoad - [charts] Fix TS config (#11259) @alexfauquette
- [charts] Fix error with empty dataset (#11063) @alexfauquette
- [charts] Fix export strategy (#11235) @alexfauquette
- [charts] Remove outdated prop-types (#11045) @alexfauquette
Docs
- [docs] Add
TextField
styling example to customization playground (#10812) @noraleonte - [docs] Add a card grid to the installation page (#11177) @danilo-leal
- [docs] Add end v6 blog post to what's new page (#10999) @joserodolfofreitas
- [docs] Add small formatting improvements to the licensing page (#11178) @danilo-leal
- [docs] Document charts composition (#10710) (#11239) @alexfauquette
- [docs] Fix <title> generation (#11182) @oliviertassinari
- [docs] Fix dead anchor link (#11265) @oliviertassinari
- [docs] Improve Data Grid togglable columns example (#11238) @MBilalShafi
- [docs] Improve the prop descriptions of
DayCalendar
(#11158) @flaviendelangle - [docs] Move the adapter breaking changes in a collapsable block (#11205) @flaviendelangle
- [docs] Polish Next.js header description @oliviertassinari
- [docs] Remove the
newFeature
flag on v6 features (#11168) @flaviendelangle - [docs] Simplify a bit chart demo (#11173) @oliviertassinari
- [docs] Standardize the usage of callouts in the MUI X docs (#7127) @samuelsycamore
- [docs] Adjust the Data Grid demo page design (#11231) @danilo-leal
Core
- [core] Make
@mui/system
a direct dependency (#11128) @LukasTy - [core] Remove blank lines, coding style @oliviertassinari
- [core] Remove outdated
ENABLE_AD
env variable (#11181) @oliviertassinari - [github] Do not add
plan: Pro
andplan: Premium
labels on pro/premium issue templates (#10183) @flaviendelangle
v6.18.3
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
- 📈 Fix a lot of Charts package issues
- 🌍 Improve Bulgarian (bg-BG) locale on Data Grid
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.18.3
- [DataGrid] Fix cell editing adding a leading "v" on paste (#11166) @prasad5795
- [DataGrid] Fix handling of event target in portal (#11209) @cherniavskii
- [DataGrid] Fix
onFilterModelChange
being fired with stale field value (#11244) @gitstart - [l10n] Improve Bulgarian (bg-BG) locale (#10856) (#11206) @Kristiqn95
@mui/x-data-grid-pro@6.18.3
Same changes as in @mui/x-data-grid@6.18.3
.
@mui/x-data-grid-premium@6.18.3
Same changes as in @mui/x-data-grid-pro@6.18.3
, plus:
- [DataGridPremium] Fix aggregated column ignoring column definition changes (#11176) @cherniavskii
- [DataGridPremium] Fix custom filter operators not working on aggregated column (#11201) @cherniavskii
Date Pickers
@mui/x-date-pickers@6.18.3
- [pickers] Correctly format
MultiSectionDigitalClock
number sections (#11297) @LukasTy - [pickers] Expand field placeholder methods flexibility by providing
format
parameter (#11254) @LukasTy
@mui/x-date-pickers-pro@6.18.3
Same changes as in @mui/x-date-pickers@6.18.3
.
Charts / @mui/x-charts@6.18.3
- [charts] Adjusted
defaultizeValueFormatter
util to accept an optionalseries.valueFormatter
value (#11213) @michelengelen - [charts] Apply
labelStyle
andtickLabelStyle
props on<ChartsYAxis />
(#11180) @akamfoad - [charts] Fix TS config (#11259) @alexfauquette
- [charts] Fix error with empty dataset (#11063) @alexfauquette
- [charts] Fix export strategy (#11235) @alexfauquette
Docs
- [docs] Add LTS section to support page (#11300) @joserodolfofreitas
- [docs] Add end v6 blogpost to whats new page (#11299) @joserodolfofreitas
- [docs] Document charts composition (#10710) @alexfauquette
- [docs] Fix version links (#11167) @LukasTy
- [docs] Improve Data Grid togglable columns example (#11241) @MBilalShafi
- [docs] Split charts overview and getting started in distinct pages (#10910) @alexfauquette
v7.0.0-alpha.2
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
- 📈 Export missing Charts props
- 🌍 Improve Arabic (ar-SD) and Hebrew (he-IL) locales on Data Grid
- 🌍 Add Macedonian (mk) locale and improve German (de-DE) locale on Pickers
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@7.0.0-alpha.2
- [l10n] Improve Arabic (ar-SD) locale (#11114) @MBilalShafi
- [l10n] Improve Hebrew (he-IL) locale (#11056) (#11149) @MBilalShafi
- [DataGrid] Remove unused utilities (#11156) @flaviendelangle
@mui/x-data-grid-pro@7.0.0-alpha.2
Same changes as in @mui/x-data-grid@7.0.0-alpha.2
.
@mui/x-data-grid-premium@7.0.0-alpha.2
Same changes as in @mui/x-data-grid-pro@7.0.0-alpha.2
.
Date Pickers
Breaking changes
-
The deprecated
shouldDisableClock
prop has been removed in favor of the more flexibleshouldDisableTime
prop.
TheshouldDisableClock
prop receivedvalue
as anumber
of hours, minutes, or seconds.
Instead, theshouldDisableTime
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 thedate
method.
You can use theadapter.date
method instead:- adapter.dateWithTimezone(undefined, 'system'); + adapter.date(undefined, 'system');
-
The
dayPickerClasses
variable has been renamed todayCalendarClasses
to be consistent with the new name of theDayCalendar
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 flexiblereferenceDate
prop.- <DateCalendar defaultCalendarMonth={dayjs('2022-04-01')}; + <DateCalendar referenceDate{dayjs('2022-04-01')} />
-
The
adapter.date
method now has the v6adapter.dateWithTimezone
method behavior.
It no longer acceptsany
as a value but onlystring | 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/x-date-pickers@7.0.0-alpha.2
- [l10n] Improve German (de-DE) locale (#11103) @jho-vema
- [l10n] Add Macedonian (mk) locale (#10935) @brsnik
- [pickers] Remove the
defaultCalendarMonth
prop (#10987) @flaviendelangle - [pickers] Remove the
shouldDisableClock
prop (#11042) @flaviendelangle - [pickers] Rename the
dayPickerClasses
variabledayCalendarClasses
(#11140) @flaviendelangle - [pickers] Replace
adapter.date
with the currentadapter.dateWithTimezone
(#10979) @flaviendelangle
@mui/x-date-pickers-pro@7.0.0-alpha.2
Same changes as in @mui/x-date-pickers@7.0.0-alpha.2
.
Charts / @mui/x-charts@7.0.0-alpha.2
- [charts] Change export strategy in index files (#11113) @michelengelen
- [charts] Fix
ChartsTooltip
component setup (#11152) @LukasTy
@mui/x-codemod@7.0.0-alpha.2
- [codemod] Add codemod to use
referenceDate
instead ofdefaultCalendarMonth
(#11139) @flaviendelangle - [codemod] Clean the components to slots codemod usage (#11145) @flaviendelangle
Docs
- [docs] Add LTS section to support docs (#10927) @joserodolfofreitas
- [docs] Clean the codemod README (#11051) @flaviendelangle
- [docs] Fix typos and grammar issues (#11049) @flaviendelangle
- [docs] Fix version links (#11001) @LukasTy
- [docs] Point to the source of
@mui/x-data-grid-generator
(#11134) @oliviertassinari
Core
- [core] Bump monorepo (#11160) @LukasTy
- [core] Fix comment in doc generation (#11098) @flaviendelangle
- [core] Rename OpenCollective @oliviertassinari
- [core] Upgrade
babel-plugin-module-resolver
to 5.0.0 (#11065) @flaviendelangle - [changelog] Improve git diff format @oliviertassinari
- [renovate] Monthly schedule for lockfile maintenance (#10336) @Janpot
- [test] Skip flaky e2e test in webkit (#11110) @cherniavskii
v6.18.2
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
- 🌍 Improve Arabic (ar-SD), Czech (cs-CZ), and Hebrew (he-IL) locales on Data Grid
- 🌍 Add Basque (eu) and Macedonian (mk) locales on Pickers
- 🌍 Improve German (de-DE) and Spanish (es-ES) locales on Pickers
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.18.2
- [l10n] Improve Arabic (ar-SD) locale (#11096) @OmarWebDev
- [l10n] Improve Czech (cs-CZ) locale (#10968) @luborepka
- [l10n] Improve Hebrew (he-IL) locale (#11056) @LironKiloma
@mui/x-data-grid-pro@6.18.2
Same changes as in @mui/x-data-grid@6.18.2
.
@mui/x-data-grid-premium@6.18.2
Same changes as in @mui/x-data-grid-pro@6.18.2
.
Date Pickers
@mui/x-date-pickers@6.18.2
- [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10985) @lajtomekadimon
- [l10n] Add Macedonian (mk) locale (#11155) @brsnik
- [l10n] Improve German (de-DE) locale (#11104) @jho-vema
- [pickers] Deprecate
defaultCalendarMonth
prop (#11138) @flaviendelangle - [pickers] Fix
DateCalendar
crashing when given an invalid value (#11101) @flaviendelangle
@mui/x-date-pickers-pro@6.18.2
Same changes as in @mui/x-date-pickers@6.18.2
.
Charts / @mui/x-charts@6.18.2
- [charts] Fix
ChartsTooltip
component setup (#11157) @LukasTy - [charts] Remove outdated prop-types (#10998) @alexfauquette
Docs
- [docs] Fix incoherent naming of a component in
Custom slots and subcomponents
page (#11003) @lhilgert9 - [test] Skip flaky e2e test in webkit (#11115) @cherniavskii
- [test] Wait for images to load (#11109) @cherniavskii
v7.0.0-alpha.1
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
- 🐞 Bugfixes
- 📚 Documentation improvements
Date Pickers
@mui/x-date-pickers@7.0.0-alpha.1
/ @mui/x-date-pickers-pro@7.0.0-alpha.1
Breaking changes
-
The string argument of the
dayOfWeekFormatter
prop has been replaced in favor of the date object to allow more flexibility.<DateCalendar // If you were still using the day string, you can get it back with your date library. - dayOfWeekFormatter={dayStr => `${dayStr}.`} + dayOfWeekFormatter={day => `${day.format('dd')}.`} // If you were already using the day object, just remove the first argument. - dayOfWeekFormatter={(_dayStr, day) => `${day.format('dd')}.`} + dayOfWeekFormatter={day => `${day.format('dd')}.`} />
-
The imports related to the
calendarHeader
slot have been moved from@mui/x-date-pickers/DateCalendar
to@mui/x-date-pickers/PIckersCalendarHeader
:export { pickersCalendarHeaderClasses, PickersCalendarHeaderClassKey, PickersCalendarHeaderClasses, PickersCalendarHeader, PickersCalendarHeaderProps, PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps, ExportedPickersCalendarHeaderProps, -} from '@mui/x-date-pickers/DateCalendar'; +} from '@mui/x-date-pickers/PickersCalendarHeader';
-
The
monthAndYear
format has been removed.
It was used in the header of the calendar views, you can replace it with the newformat
prop of thecalendarHeader
slot:<LocalizationProvider adapter={AdapterDayJS} - formats={{ monthAndYear: 'MM/YYYY' }} /> <DatePicker + slotProps={{ calendarHeader: { format: 'MM/YYYY' }}} /> <DateRangePicker + slotProps={{ calendarHeader: { format: 'MM/YYYY' }}} /> <LocalizationProvider />
-
The
adapter.getDiff
method have been removed, you can directly use your date library:// For Day.js -const diff = adapter.getDiff(value, comparing, unit); +const diff = value.diff(comparing, unit); // For Luxon -const diff = adapter.getDiff(value, comparing, unit); +const getDiff = (value: DateTime, comparing: DateTime | string, unit?: AdapterUnits) => { + const parsedComparing = typeof comparing === 'string' + ? DateTime.fromJSDate(new Date(comparing)) + : comparing; + if (unit) { + return Math.floor(value.diff(comparing).as(unit)); + } + return value.diff(comparing).as('millisecond'); +}; + +const diff = getDiff(value, comparing, unit); // For DateFns -const diff = adapter.getDiff(value, comparing, unit); +const getDiff = (value: Date, comparing: Date | string, unit?: AdapterUnits) => { + const parsedComparing = typeof comparing === 'string' ? new Date(comparing) : comparing; + switch (unit) { + case 'years': + return dateFns.differenceInYears(value, parsedComparing); + case 'quarters': + return dateFns.differenceInQuarters(value, parsedComparing); + case 'months': + return dateFns.differenceInMonths(value, parsedComparing); + case 'weeks': + return dateFns.differenceInWeeks(value, parsedComparing); + case 'days': + return dateFns.differenceInDays(value, parsedComparing); + case 'hours': + return dateFns.differenceInHours(value, parsedComparing); + case 'minutes': + return dateFns.differenceInMinutes(value, parsedComparing); + case 'seconds': + return dateFns.differenceInSeconds(value, parsedComparing); + default: { + return dateFns.differenceInMilliseconds(value, parsedComparing); + } + } +}; + +const diff = getDiff(value, comparing, unit); // For Moment -const diff = adapter.getDiff(value, comparing, unit); +const diff = value.diff(comparing, unit);
-
The
adapter.getFormatHelperText
method have been removed, you can use theadapter.expandFormat
instead:
-const expandedFormat = adapter.getFormatHelperText(format);
+const expandedFormat = adapter.expandFormat(format);
And if you need the exact same output you can apply the following transformation:
// For Day.js
-const expandedFormat = adapter.getFormatHelperText(format);
+const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
// For Luxon
-const expandedFormat = adapter.getFormatHelperText(format);
+const expandedFormat = adapter.expandFormat(format).replace(/(a)/g, '(a|p)m').toLocaleLowerCase();
// For DateFns
-const expandedFormat = adapter.getFormatHelperText(format);
+const expandedFormat = adapter.expandFormat(format).replace(/(aaa|aa|a)/g, '(a|p)m').toLocaleLowerCase();
// For Moment
-const expandedFormat = adapter.getFormatHelperText(format);
+const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
-
The
adapter.getMeridiemText
method have been removed, you can use theadapter.setHours
,adapter.date
andadapter.format
methods to recreate its behavior:-const meridiem = adapter.getMeridiemText('am'); +const getMeridiemText = (meridiem: 'am' | 'pm') => { + const date = adapter.setHours(adapter.date()!, meridiem === 'am' ? 2 : 14); + return utils.format(date, 'meridiem'); +}; + +const meridiem = getMeridiemText('am');
-
The
adapter.getMonthArray
method have been removed, you can use theadapter.startOfYear
andadapter.addMonths
methods to recreate its behavior:-const monthArray = adapter.getMonthArray(value); +const getMonthArray = (year) => { + const firstMonth = utils.startOfYear(year); + const months = [firstMonth]; + + while (months.length < 12) { + const prevMonth = months[months.length - 1]; + months.push(utils.addMonths(prevMonth, 1)); + } + + return months; +} + +const monthArray = getMonthArray(value);
-
The
adapter.getNextMonth
method have been removed, you can use theadapter.addMonths
method instead:-const nextMonth = adapter.getNextMonth(value); +const nextMonth = adapter.addMonths(value, 1);
-
The
adapter.getPreviousMonth
method have been removed, you can use theadapter.addMonths
method instead:-const previousMonth = adapter.getPreviousMonth(value); +const previousMonth = adapter.addMonths(value, -1);
-
The
adapter.getWeekdays
method have been removed, you can use theadapter.startOfWeek
andadapter.addDays
methods instead:-const weekDays = adapter.getWeekdays(value); +const getWeekdays = (value) => { + const start = adapter.startOfWeek(value); + return [0, 1, 2, 3, 4, 5, 6].map((diff) => utils.addDays(start, diff)); +}; + +const weekDays = getWeekdays(value);
-
The
isNull
method have been removed, you can replace it with a very basic check:-const isNull = adapter.isNull(value); +const isNull = value === null;
-
The
adapter.mergeDateAndTime
method have been removed, you can use theadapter.setHours
,adapter.setMinutes
, andadapter.setSeconds
methods to recreate its behavior:-const result = adapter.mergeDateAndTime(valueWithDate, valueWithTime); +const mergeDateAndTime = <TDate>( + dateParam, + timeParam, + ) => { + let mergedDate = dateParam; + mergedDate = utils.setHours(mergedDate, utils.getHours(timeParam)); + mergedDate = utils.setMinutes(mergedDate, utils.getMinutes(timeParam)); + mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam)); + + return mergedDate; + }; + +const result = mergeDateAndTime(valueWithDate, valueWithTime);
-
The
adapter.parseISO
method have been removed, you can directly use your date library:// For Day.js -const value = adapter.parseISO(isoString); +const value = dayjs(isoString); // For Luxon -const value = adapter.parseISO(isoString); +const value = DateTime.fromISO(isoString); // For DateFns -const value = adapter.parseISO(isoString); +const value = dateFns.parseISO(isoString); // For Moment -const value = adapter.parseISO(isoString); +const value = moment(isoString, true);
-
The
adapter.toISO
method have been removed, you can directly use your date library:-const isoString = adapter.toISO(value); +const isoString = value.toISOString(); +const isoString = value.toUTC().toISO({ format: 'extended' }); +const isoString = dateFns.formatISO(value, { format: 'extended' }); +const isoString = value.toISOString();
-
The
adapter.isEqual
method used to accept any type of value for its two input and tried to parse them before checking if they were equal.
The method has been simplified and now only accepts an already-parsed date ornull
(ie: the same formats used by thevalue
prop in the pickers)const adapterDayjs = new AdapterDayjs(); const adapterLuxon = new AdapterLuxon(); const adapterDateFns = new AdapterDateFns(); const adapterMoment = new AdatperMoment(); // Supported formats const isEqual = adapterDayjs.isEqual(null, null); // Same for the other adapters const isEqual = adapterLuxon.isEqual(DateTime.now(), DateTime.fromISO('2022-04-17')); const isEqual = adapterMoment.isEqual(moment(), moment('2022-04-17')); const isEqual = adapterDateFns.isEqual(new Date(), new Date('2022-04-17')); // Non-supported formats (JS Date) -const isEqual = adapterDayjs.isEqual(new Date(), new Date('2022-04-17'));...
v7.0.0-alpha.0
We're thrilled to announce the first alpha release of our next major version, v7.
This release introduces a few breaking changes, paving the way for the upcoming features like Pivoting and DateTimeRangePicker.
A special shoutout to thank the 12 contributors who made this release possible. Here are some highlights ✨:
- 🚀 First v7 alpha release
- ✨ Fix aggregation label not showing when
renderHeader
is used (#10961) @cherniavskii - 📘 Server side data source early documentation
- 💫 New recipes added for the data grid
- 📈
<ChartsReferenceLine />
component is now available - 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
Breaking changes
- The deprecated
components
andcomponentsProps
props have been removed. Useslots
andslotProps
instead. See components section for more details. - The print export will now only print the selected rows if there are any.
If there are no selected rows, it will print all rows. This makes the print export consistent with the other exports.
You can customize the rows to export by using thegetRowsToExport
function. - The
getApplyFilterFnV7
inGridFilterOperator
was renamed togetApplyFilterFn
.
If you usegetApplyFilterFnV7
directly - rename it togetApplyFilterFn
. - The signature of the function returned by
getApplyFilterFn
has changed for performance reasons:
const getApplyFilterFn: GetApplyFilterFn<any, unknown> = (filterItem) => {
if (!filterItem.value) {
return null;
}
const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
- return (cellParams) => {
- const { value } = cellParams;
+ return (value, row, colDef, apiRef) => {
return value != null ? filterRegex.test(String(value)) : false;
};
}
- The
getApplyQuickFilterFnV7
inGridColDef
was renamed togetApplyQuickFilterFn
.
If you usegetApplyQuickFilterFnV7
directly - rename it togetApplyQuickFilterFn
. - The signature of the function returned by
getApplyQuickFilterFn
has changed for performance reasons:
const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown> = (value) => {
if (!value) {
return null;
}
const filterRegex = new RegExp(escapeRegExp(value), 'i');
- return (cellParams) => {
- const { formattedValue } = cellParams;
+ return (value, row, column, apiRef) => {
+ let formattedValue = apiRef.current.getRowFormattedValue(row, column);
return formattedValue != null ? filterRegex.test(formattedValue.toString()) : false;
};
};
@mui/x-data-grid@7.0.0-alpha.0
- [DataGrid] Fix for error thrown when removing skeleton rows, after sorting is applied (#10807) @benjaminbialy
- [DataGrid] Fix:
undefined
slot value (#10937) @romgrk - [DataGrid] Print selected rows by default (#10846) @cherniavskii
- [DataGrid] Remove deprecated
components
andcomponentsProps
(#10911) @MBilalShafi - [DataGrid] Remove legacy filtering API (#10897) @cherniavskii
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10882) @michelengelen
- [DataGrid] Added a recipe for using non-native select in filter panel (#10916) @michelengelen
- [DataGrid] Added a recipe to style cells without impacting the aggregation cells (#10913) @michelengelen
- [l10n] Improve Czech (cs-CZ) locale (#10949) @luborepka
@mui/x-data-grid-pro@7.0.0-alpha.0
Same changes as in @mui/x-data-grid@7.0.0-alpha.0
, plus:
- [DataGridPro] Autosize Columns - Fix headers being cut off (#10666) @gitstart
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
@mui/x-data-grid-premium@7.0.0-alpha.0
Same changes as in @mui/x-data-grid-pro@7.0.0-alpha.0
, plus:
- [DataGridPremium] Render aggregation label when
renderHeader
is used (#10936) @cherniavskii
Date Pickers
Breaking changes
- The deprecated
components
andcomponentsProps
props have been removed. Useslots
andslotProps
instead.
@mui/x-date-pickers@7.0.0-alpha.0
- [pickers] Escape non tokens words (#10400) @alexfauquette
- [fields] Fix
MultiInputTimeRangeField
section selection (#10922) @noraleonte - [pickers] Refine
referenceDate
behavior in views (#10863) @LukasTy - [pickers] Remove
components
andcomponentsProps
props (#10700) @alexfauquette - [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10819) @lajtomekadimon
- [pickers] Add short weekdays token (#10988) @alexfauquette
@mui/x-date-pickers-pro@7.0.0-alpha.0
Same changes as in @mui/x-date-pickers@7.0.0-alpha.0
.
Charts / @mui/x-charts@7.0.0-alpha.0
Breaking changes
Types for slots
and slotProps
got renamed by removing the "Component" which is meaningless for charts.
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
Here is an example of the renaming for the <ChartsTooltip />
component.
-ChartsTooltipSlotsComponent
+ChartsTooltipSlots
-ChartsTooltipSlotComponentProps
+ChartsTooltipSlotProps
- [charts] Add
<ChartsReferenceLine />
component (#10597) (#10946) @alexfauquette - [charts] Improve properties JSDoc (#10931) (#10955) @alexfauquette
- [charts] Rename
slots
andslotProps
types (#10875) @alexfauquette
@mui/x-codemod@7.0.0-alpha.0
Docs
- [docs] Add
@next
tag to the installation instructions (#10963) @MBilalShafi - [docs] Document how to hide the legend (#10951) @alexfauquette
- [docs] Fix typo in the migration guide (#10972) @flaviendelangle
Core
- [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
- [core] Bump monorepo (#10959) @LukasTy
- [core] Changed prettier branch value to next (#10917) @michelengelen
- [core] Fix GitHub title tag consistency @oliviertassinari
- [core] Fixed wrong package names in migration docs (#10953) @michelengelen
- [core] Merge
master
intonext
(#10929) @cherniavskii - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
- [license] Correctly throw errors (#10924) @oliviertassinari
v6.18.1
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
- ✨ Fix aggregation label not showing when
renderHeader
is used (#10961) @cherniavskii - 📘 Server side data source early documentation published
- 📈
<ChartsReferenceLine />
component is now available - 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.18.1
- [DataGrid] Fix cell value type in quick filtering v7 (#10884) @cherniavskii
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10947) @michelengelen
- [DataGrid] Fix
undefined
slot values (#10934) @romgrk
@mui/x-data-grid-pro@6.18.1
Same changes as in @mui/x-data-grid@6.18.1
, plus:
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
@mui/x-data-grid-premium@6.18.1
Same changes as in @mui/x-data-grid-pro@6.18.1
, plus:
- [DataGridPremium] Render aggregation label when
renderHeader
is used (#10961) @cherniavskii
Date Pickers
@mui/x-date-pickers@6.18.1
- [fields] Fix multi input date time field section selection (#10915) @noraleonte
- [pickers] Always use up-to-date
defaultView
(#10889) @LukasTy
@mui/x-date-pickers-pro@6.18.1
Same changes as in @mui/x-date-pickers@6.18.1
.
Charts / @mui/x-charts@6.18.1
- [charts] Add
<ChartsReferenceLine />
component (#10597) @wascou - [charts] Improve properties JSDoc (#10931) @alexfauquette
Docs
- [docs] Fix charts docs as stable (#10888) @alexfauquette
- [docs] Document how to hide the legend (#10954) @alexfauquette
Core
- [core] Adds new alpha version to version select on the docs (#10944) @michelengelen
- [core] Fix GitHub title tag consistency @oliviertassinari
v6.18.0
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
- 🎁 The Charts package is now officially stable!
- 🥧 Pie charts are now animated.
- 📈 Line charts now support partial data, and can interpolate missing data https://mui.com/x/react-charts/lines/#skip-missing-points.
- ✨ The data grid allows to ignore diacritics when filtering.
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.18.0
- [DataGrid] Allow to ignore diacritics when filtering (#10569) @cherniavskii
- [DataGrid] Fix a typo in
gridFilterApi
(#10786) @vu-dao-93 - [DataGrid] Fix
undefined
row id (#10670) @romgrk - [DataGrid] Make column autosizing work with dynamic row height (#10693) @cherniavskii
- [l10n] Allow to customize sorting label per column (#10839) @JerryWu1234
@mui/x-data-grid-pro@6.18.0
Same changes as in @mui/x-data-grid@6.18.0
.
@mui/x-data-grid-premium@6.18.0
Same changes as in @mui/x-data-grid-pro@6.18.0
.
Date Pickers
@mui/x-date-pickers@6.18.0
- [pickers] Add reference links to calendar components (#10644) @michelengelen
@mui/x-date-pickers-pro@6.18.0
Same changes as in @mui/x-date-pickers@6.18.0
.
Charts / @mui/x-charts@6.18.0
- [charts] Add animation on pie chart (#10782) @alexfauquette
- [charts] Add reference links to shared/misc chart components (#10660) @michelengelen
- [charts] Allows to connect nulls (#10803) @alexfauquette
- [charts] Fix axis highlight in dark mode (#10820) @LukasTy
Docs
- [docs] Add a data grid recipe for autosizing columns after fetching row-data (#10822) @michelengelen
- [docs] Add a data grid recipe showing how to remove cell outline on
focus
(#10843) @michelengelen - [docs] Add demo about how to use charts margin (#10886) @alexfauquette
- [docs] Improve custom field input demos readability (#10559) @LukasTy
Core
v6.17.0
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
- 🎁 The Tree View package is now officially stable!
- ✨ Improve the handling of non-numeric values by Data Grid aggregation
- 🚀 Support lines with different domains on the line charts
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.17.0
- [DataGrid] Allow custom debounce time for row positions calculation (#10708) @cherniavskii
- [DataGrid] Persist stable row index for focused row (#10674) @cherniavskii
@mui/x-data-grid-pro@6.17.0
Same changes as in @mui/x-data-grid@6.17.0
, plus:
- [DataGridPro] Fix
undefined
values passed tovalueFormatter
for tree leaf nodes (#10748) @cherniavskii
@mui/x-data-grid-premium@6.17.0
Same changes as in @mui/x-data-grid-pro@6.17.0
, plus:
- [DataGridPremium] Fix
avg
aggregation to ignore non-numeric values (#10787) @cherniavskii - [DataGridPremium] Fix
size
aggregation to ignoreundefined
values (#10745) @cherniavskii - [DataGridPremium] Fix
sum
aggregation to ignore non-numeric values (#10730) @cherniavskii - [DataGridPremium] Fix cell selection throwing index error on second page and beyond (#10784) @MBilalShafi
v6.16.3
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
- 🎁 Add a Data Grid recipe for saving & restoring state
- 💫 Support animations on the bar chart
- 🐞 Bugfixes
- 📚 Documentation improvements
Data Grid
@mui/x-data-grid@6.16.3
@mui/x-data-grid-pro@6.16.3
Same changes as in @mui/x-data-grid@6.16.3
.
@mui/x-data-grid-premium@6.16.3
Same changes as in @mui/x-data-grid-pro@6.16.3
.
Date Pickers
@mui/x-date-pickers@6.16.3
- [fields] Correctly respect leading zeroes on seconds section (#10713) @flaviendelangle
- [fields] Use
onChange
instead ofonKeyPress
for Backspace editing (#10494) @flaviendelangle - [pickers] Add reference links to DatePicker components (#10626) @michelengelen
- [pickers] Add reference links to clock components (#10645) @michelengelen
- [pickers] Add reference links to misc picker components (#10647) @michelengelen
- [pickers] Add reference links to toolbar components (#10646) @michelengelen
- [pickers] POC: Change the props received by the
FakeTextField
component (#10687) @flaviendelangle
@mui/x-date-pickers-pro@6.16.3
Same changes as in @mui/x-date-pickers@6.16.3
, plus:
- [DateRangePicker] Fix touch based range dragging (#10664) @michelengelen
Charts / @mui/x-charts@6.0.0-alpha.16
- [charts] Add reference links to area + bar chart components (#10652) @michelengelen
- [charts] Add reference links to line chart + sparkline components (#10650) @michelengelen
- [charts] Add reference links to pie + scatter chart components (#10653) @michelengelen
- [charts] Render only when
width
andheight
are resolved (#10714) @alexfauquette - [charts] Support animation on
BarChart
(#9926) @alexfauquette - [charts] Use new text component to avoid tick label overflow on x-axis (#10648) @alexfauquette
Docs
- [docs] Add a recipe for saving and restoring
state
externally (#10722) @michelengelen - [docs] Add example about how to add an axis (#10709) @alexfauquette
- [docs] Customization Playground - fix DesktopDatePicker sx props and styled examples (#10665) @noraleonte
- [docs] Improve meta description @oliviertassinari
- [docs] Make overview demo work in codesandbox (#10661) @alexfauquette