-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[material-ui][Slider] TypeError: color.charAt is not a function error message after upgrade @mui/material to 5.15.14 #41772
Comments
Not sure if this is related, but I was getting a similar error when trying to add a Switch, while also having the I see you have another mui-x package. Maybe it’s related? |
@jbouder I doubt it. This problem emerged as a regression in version |
Yeah, after digging deeper, the regression seemed to be the real underlying cause. Thanks for the follow up! |
@bzhn I'm not sure why you need such deeply nested palette color fields like export const theme = createTheme({
palette: {
primary: {
main: '#FFCC00',
dark: '#FFCC00',
},
secondary: {
main: '#FFCC00',
dark: '#FFCC00',
},
blue: {
main: '#4287f5',
dark: '#022e73',
light: '#94bbf7',
},
},
}); This is consistent with our documentation: https://mui.com/material-ui/customization/palette/#custom-colors. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Reopening as it's a clear regression: https://stackblitz.com/edit/react-ceuj3r-5w3j9r?file=theme.ts breaks. |
What is the status of this issue? |
Yes a status update would be good. I haven’t been able to update for a while now because of this issue. |
@DiegoAndai This is related to another issue (I could not find it) that we used to discuss. To create a util that handle the If you still have some capacity, I'd like a help here but it can be done after v6 stable too. |
@siriwatknp, is this the issue you're referencing? #42698 (comment) Sorry I missed this before. I can take a look at it this week. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @bzhn! How was your experience with our support team? |
Steps to reproduce
Link to live example: (example on stackblitz)
Steps:
<Slider aria-label={"Number range"} min={0} max={1234} />
Current behavior
I get the following error when trying to use Slider within the ThemeProvider with custom theme
gives me the following error message in the console
or on StackBlitz
and the following in my browser
Expected behavior
No errors occurs when using palette with nested fields in my custom theme.
Context
No response
Your environment
npx @mui/envinfo
I use Firefox and Chrome browsers.
Search keywords: color.charAt, Slider, colorManipulator, theme, palette, ThemeProvider
The text was updated successfully, but these errors were encountered: