github mui/mui-x v8.0.0-alpha.10

pre-release19 hours ago

We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:

  • 🎨 Data Grid theming improvements and default background color
  • 📚 Documentation improvements
  • 🐞 Bugfixes

Special thanks go out to the community contributors who have helped make this release possible:
@k-rajat19, @lauri865, @mateuseap.
Following are all team members who have contributed to this release:
@alexfauquette, @flaviendelangle, @JCQuintas, @KenanYusuf, @MBilalShafi, @romgrk, @arminmeh.

Data Grid

Breaking changes

  • viewportInnerSize.width now includes pinned columns' widths (fixes recursive loops in updating dimensions <-> columns)

  • The Data Grid now has a default background color, and its customization has moved from theme.mixins.MuiDataGrid to theme.palette.DataGrid with the following properties:

    • bg: Sets the background color of the entire grid (new property)
    • headerBg: Sets the background color of the header (previously named containerBackground)
    • pinnedBg: Sets the background color of pinned rows and columns (previously named pinnedBackground)
     const theme = createTheme({
    -  mixins: {
    -    MuiDataGrid: {
    -      containerBackground: '#f8fafc',
    -      pinnedBackground: '#f1f5f9',
    -    },
    -  },
    +  palette: {
    +    DataGrid: {
    +      bg: '#f8fafc',
    +      headerBg: '#e2e8f0',
    +      pinnedBg: '#f1f5f9',
    +    },
    +  },
     });
  • The detailPanels, pinnedColumns, and pinnedRowsRenderZone classes have been removed.

  • Return type of the useGridApiRef() hook and the type of apiRef prop are updated to explicitly include the possibilty of null. In addition to this, useGridApiRef() returns a reference that is initialized with null instead of {}.

    Only the initial value and the type are updated. Logic that initializes the API and its availability remained the same, which means that if you could access API in a particular line of your code before, you are able to access it as well after this change.

    Depending on the context in which the API is being used, you can decide what is the best way to deal with null value. Some options are:

    • Use optional chaining
    • Use non-null assertion operator if you are sure your code is always executed when the apiRef is not null
    • Return early if apiRef is null
    • Throw an error if apiRef is null

@mui/x-data-grid@8.0.0-alpha.10

@mui/x-data-grid-pro@8.0.0-alpha.10 pro

Same changes as in @mui/x-data-grid@8.0.0-alpha.10, plus:

  • [DataGridPro] Fetch new rows only once when multiple models are changed in one cycle (#16101) @arminmeh
  • [DataGridPro] Fix the return type of useGridApiRef for Pro and Premium packages on React < 19 (#16328) @arminmeh

@mui/x-data-grid-premium@8.0.0-alpha.10 premium

Same changes as in @mui/x-data-grid-pro@8.0.0-alpha.10.

Date and Time Pickers

Breaking changes

  • The component passed to the field slot no longer receives the ref, disabled, className, sx, label, name, formatDensity, enableAccessibleFieldDOMStructure, selectedSections, onSelectedSectionsChange and inputRef props — Learn more
  • The MuiPickersPopper theme entry have been renamed MuiPickerPopper and some of its props have been removed — Learn more

@mui/x-date-pickers@8.0.0-alpha.10

@mui/x-date-pickers-pro@8.0.0-alpha.10 pro

Same changes as in @mui/x-date-pickers@8.0.0-alpha.10.

Charts

Breaking changes

  • Replace legend.position.horizontal from "left" | "middle" | "right" to "start" | "center" | "end".
    This is to align with the CSS values and reflect the RTL ability of the legend component.
  • The default colors have changed. To keep using the old palette. It is possible to import blueberryTwilightPalette from @mui/x-charts/colorPalettes and set it on the colors property of charts.
  • The id property is now optional on the Pie and Scatter data types.

@mui/x-charts@8.0.0-alpha.10

@mui/x-charts-pro@8.0.0-alpha.10 pro

Same changes as in @mui/x-charts@8.0.0-alpha.10.

Tree View

@mui/x-tree-view@8.0.0-alpha.10

Internal changes.

@mui/x-tree-view-pro@8.0.0-alpha.10 pro

Same changes as in @mui/x-tree-view@8.0.0-alpha.10.

Docs

Core

Don't miss a new mui-x release

NewReleases is sending notifications on new releases.