[material-ui] MenuItem component crashes on dividerClasses when migrating to v5 #40204
Closed
2 tasks done
Labels
component: menu
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for author
Issue with insufficient information
v5.x migration
Duplicates
Latest version
Steps to reproduce 馃暪
Link to live example:
Steps:
<MenuItem>
in the tree be it static or dynamic like a<Select>
Current behavior 馃槸
This is a super weird behavior and unfortunately I can't seem to reproduce except on these internal systems. I have exhausted what could be the difference from the working versions I have of it and the one that doesn't work. This feels like something obvious that I just can't see even with all the debugging and testing I have done to try and figure it out.
Even using the example of https://mui.com/material-ui/react-table/#data-table where the drop-down for rows per page is clicked once the MenuItem is attempted to be rendered the error rears it's ugly head.
I would also add that whether the code is in a
ThemeProvider
or not the bug persists so I feel like it might be something witt WebPack (5) or something else with that process i am not seeing.Here is a stack-trace of the error when rendering any menu item which points to this line in source which implies that
dividerClasses
is undefined and I cannot for the life of me figure out why. I have tried an exhaustive number of things to try and get this error fixed but nothing seems to work.Actual stack-trace from chrome.
Expected behavior 馃
Just expect it not to crash the entire app and render as expected.
Context 馃敠
Been in the process of upgrading from Material UI v4 to v5 and this is the only component that doesn't work. It doesn't feel like a bug in Material UI but I guess it could be? I just feel like i am missing something from the upgrade process and just cannot see it
Your environment 馃寧
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: