github mui/mui-x v5.1.0

latest releases: v7.4.0, v7.3.2, v7.3.1...
2 years ago

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 and useGridApiEventHandler 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

Core

Docs

Don't miss a new mui-x release

NewReleases is sending notifications on new releases.