A big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
@mui/x-data-grid@v5.1.0
/ @mui/x-data-grid-pro@v5.1.0
-
🚀 Introduce the tree data feature (#2725) @flaviendelangle
-
💅 Add support for
sx
prop in the DataGrid and DataGridPro (#3281) @m4theushw -
🔦 Improve focus management in the filter panel (#3004) @alexfauquette
-
🎁 Add strict typing to the event publisher and listener (#3022) (@flaviendelangle)
The
apiRef.current.subscribeEvent
,apiRef.current.publishEvent
anduseGridApiEventHandler
are now fully typed and gives you the correct arguments based on the event you are listening to or emitting.const handleRowClick: GridEventListener<'rowClick'> = ( params, // has type `GridRowParams` event, // has type `MuiEvent<React.MouseEvent<HTMLElement>> details, // has type `GridCallbackDetails ) => { /* ... */ }; // with string event name apiRef.current.subscribeEvent('rowClick', handleRowClick); useGridApiEventHandler(apiRef, 'rowClick', handleRowClick); // or with enum event name apiRef.current.subscribeEvent(GridEvents.rowClick, handleRowClick); useGridApiEventHandler(apiRef, GridEvents.rowClick, handleRowClick);
-
🌎 Translation updates for many locales
If you are using DataGrid or DataGridPro in another language, check this issue to discover which translations are missing.
-
📚 Documentation improvements
-
🐞 Bugfixes
Changes
- [DataGridPro] Add tree data (#2725) @flaviendelangle
- [DataGridPro] Remove the callback version of the
groupigColDef
prop (#3317) @flaviendelangle - [DataGridPro] Improve license file (#3278) @oliviertassinari
- [DataGridPro] Add types for event publishers and listeners (#3022) @flaviendelangle
- [DataGrid] Add support for
sx
prop (#3281) @m4theushw - [DataGrid] Do not debounce the initial resizing of the grid (#3213) @flaviendelangle
- [DataGrid] Fix usage of dynamic columns (#3204) @flaviendelangle
- [DataGrid] Move focus when selecting option with Enter in the
singleSelect
(#3220) @m4theushw - [DataGrid] Focus on the last value input when a filter is added or removed (#3004) @alexfauquette
- [DataGrid] Prepare the tree structure for grouping sorting / filtering (#3301) @flaviendelangle
- [DataGrid] Rework keyboard navigation (#3193) @flaviendelangle
- [DataGrid] Set minimum dimensions to
GridOverlay
when no row is provided (#3261) @flaviendelangle - [DataGrid] Improve German (deDE) locale (#3271, #3230, #3293) @sebastianfrey
- [DataGrid] Improve Hebrew (heIL) locale (#3294) @ColdAtNight
- [DataGrid] Improve Russian (ruRU) locale (#3290, #3288) @Alim-El
- [DataGrid] Improve Korean (koKR) locale (#3232, #3273) @zzossig
- [DataGrid] Improve Greek (elGR) locale (#3169) @clytras
Core
- [core] Add script to sync translation files (#3201) @m4theushw
- [core] Create dedicated
InputComponent
forsingleSelect
anddate
columns #3227 @alexfauquette - [core] Fix
EventManager
to not run listeners removed after registration #3206 @flaviendelangle - [core] Group Renovate updates (#3263) @flaviendelangle
- [core] Reflect the change of default branch (#3235) @oliviertassinari
- [core] Replace @mui/core with @mui/base (#3217) @m4theushw
- [core] Split docs generation script (#3189) @flaviendelangle
- [core] Update monorepo (#3303) @m4theushw
- [test] Improve testing of the keyboard navigation (#3187) @flaviendelangle
- [test] Force effect to run on location change (#3283) @m4theushw
- [core] Rework columns state management (#3264) @flaviendelangle
Docs
- [docs] Improve demo to allow to experiment with
autoHeight
(#3216) @alexfauquette - [docs] Fix broken images (#3300) @oliviertassinari
- [docs] Fix the wrong release date (#3269) @DanailH
- [docs] Fix typo in CHANGELOG.md (#3214) @gjoseph
- [docs] Improve plan icon placement (#3298) @oliviertassinari
- [docs] Improve rows documentation (#3209) @flaviendelangle
- [docs] Include row pinning (#3191) @oliviertassinari
- [docs] Fix presentation of key combinations (#3297) @oliviertassinari
- [docs] Replace @mui/styles on demos (#3274) @m4theushw
- [docs] Add demos using cell/row editing with server-side persistence (#3124) @flaviendelangle
- [docs] Use relative links (#3299) @oliviertassinari