mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.42k stars 32.15k forks source link

Unknown prop disableElevation in react MUI ver: 4.9.13 #24683

Closed feneles closed 3 years ago

feneles commented 3 years ago

I've tried to dif down and find why my new components couldn't use ButtonGroup without any errors like the ones listed below but all I've got was a point where props were passed down via useStyle (I think) and the package doesn't find these props to be cased as they should be. I've tried different casing and removing stylesheets but no luck there. Could anyone lend me a hand with debugging this issue?

Warning: React does not recognize the `disableElevation` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableelevation` instead. If you accidentally passed it from a parent component, remove it from the DOM element. in div (created by LeftBar) in div (created by ForwardRef(ButtonGroup)) in ForwardRef(ButtonGroup) (created by WithStyles(ForwardRef(ButtonGroup))) in WithStyles(ForwardRef(ButtonGroup)) (created by LeftBar) in div (created by LeftBar) in LeftBar (created by NewBoard) in div (created by NewBoard) in NewBoard (created by BoardFabric) in BoardFabric (created by Context.Consumer) in Route in Switch in ThemeProvider in UserProvider in Router

image

oliviertassinari commented 3 years ago

Please provide a minimal reproduction test case. This would help a lot 👷 . A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

feneles commented 3 years ago

I've already put some code, looks simillar like original one.

https://codesandbox.io/s/material-ui-issue-forked-rxepn?file=/src/index.js

oliviertassinari commented 3 years ago

@feneles Please follow the issue template. Regarding this codesandbox, we can't act on it, it's not reproducing the error.

robin-xyzt-ai commented 1 year ago

I can reproduce the issue with the following sandbox: https://codesandbox.io/s/mui-issue-24683-3dl141?file=/src/App.tsx . This one still uses MUI v4. I can only reproduce it with the disabled button though.

On V5, the same code (https://codesandbox.io/s/mui-v5-issue-24683-nl2s52?file=/src/App.tsx) seems to work.