[material-ui][Stack] Not accepting a React Fragment when using it with a divider #39160
Open
2 tasks done
Labels
component: Stack
The React component.
package: material-ui
Specific to @mui/material
status: expected behavior
Does not imply the behavior is intended. Just that we know about it and can't work around it
waiting for 👍
Waiting for upvotes
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
divider={<div>xxx</div>}
)Sandbox example:
https://codesandbox.io/s/stack-divider-fragment-bug-lnypq9
Current behavior 😯
There is no divider between each children element.
Expected behavior 🤔
Should add between each children element a divider
Context 🔦
I created an extended version of the Stack component. It's almost the same but with some additions. If you send the children elements as a React Fragment is where you get the bug. I need to accept those because it's a valid JSX code and also because my component accepts the children prop.
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: