sci-components
sci-components copied to clipboard
`defaultExpanded` MUI prop doesn't work with SDS `Accordion` component
Describe the bug
The SDS Accordion
component is built off the MUI Accordion
component, which has a prop of defaultExpanded
. When true
/ present, this boolean prop forces the Accordion to be open by default (users can still close it). However, this does not work with SDS Accordion
if this prop is manually added; it has no effect.
To Reproduce Steps to reproduce the behavior:
- Go to the index.stories.tsx file for the
Accordion
component and open Storybook - For one of the
Accordion
components, add thedefaultExpanded
prop - Check that component in Storybook
- It will not be expanded by default
Expected behavior
The Accordion with the defaultExpanded
prop should have been expanded
Additional context
Once this is fixed, update the Accordion
's Zeroheight documentation to remove the bullet about eh defaultExpanded
prop not working, form the MUI vs SDS section.