-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data grid] Cannot read properties of undefined (reading 'type') #12728
Comments
Hey @delciopolanco export interface PaletteOptions {
primary?: PaletteColorOptions;
secondary?: PaletteColorOptions;
error?: PaletteColorOptions;
warning?: PaletteColorOptions;
info?: PaletteColorOptions;
success?: PaletteColorOptions;
mode?: PaletteMode;
tonalOffset?: PaletteTonalOffset;
contrastThreshold?: number;
common?: Partial<CommonColors>;
grey?: ColorPartial;
text?: Partial<TypeText>;
divider?: string;
action?: Partial<TypeAction>;
background?: Partial<TypeBackground>;
getContrastText?: (background: string) => string;
} And the background property ( export interface TypeBackground {
default: string;
paper: string;
} This means that you cannot pass a hex colorcode into the background property. It needs to be an object respecting the type |
@michelengelen thanks for responding, it's working fine now. |
@delciopolanco: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Description.
Datagrid doesn't work with a custom Mui theme.
Steps to reproduce
Link to example: Github
Steps:
See implementation below:
Error:
Current behavior
It doesn't show the data grid, instead it throws an error like TypeError: Cannot read properties of undefined (reading 'type')
at decomposeColor
Expected behavior
It should show the Datagrid the same as this: example
Context
I'm trying to use DataGrid from Mui within my project.
Your environment
System: System: OS: macOS 14.2.1 Binaries: Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm pnpm: Not Found Browsers: Chrome: 123.0.6312.107 Edge: Not Found Safari: 17.2.1 npmPackages: @emotion/react: ^11.11.4 => 11.11.4 @emotion/styled: ^11.11.0 => 11.11.5 @mui/base: 5.0.0-beta.40 @mui/core-downloads-tracker: 5.15.15 @mui/material: ^5.15.11 => 5.15.15 @mui/private-theming: 5.15.14 @mui/styled-engine: 5.15.14 @mui/system: 5.15.15 @mui/types: 7.2.14 @mui/utils: 5.15.14 @mui/x-data-grid: ^7.1.1 => 7.1.1 @types/react: ^18.2.66 => 18.2.75 react: ^18.2.0 => 18.2.0 react-dom: ^18.2.0 => 18.2.0 typescript: ^5.2.2 => 5.4.4
Search keywords: Cannot read properties of undefined (reading 'type')
The text was updated successfully, but these errors were encountered: