[material-ui][Accordion] First/Last of type styles do not work with other components as siblings
@siriwatknp is already working on this.
Since Dec 22, 2023.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/accordion-rounded-edges-issue-phdcxr?file=%2Fsrc%2FDemo.tsx%3A17%2C41
Steps: Add a TextField as a sibling of an Accordion with rounded edges - notice the rounded edges no longer exist.
Current behavior 😯
When another component like a TextField is a sibling of an Accordion, the rounded edges and other styling from first/last-of-type styles no longer appear:
or
Expected behavior 🤔
I would expect those styles to be applied to the first and last Accordion even if there are other siblings around it like this:
Context 🔦
The workaround is to wrap the Accordions in a div to give them their own parent so this isn't a huge issue, but not sure if this is the intended behavior when rendered next to other components.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.