sci-components icon indicating copy to clipboard operation
sci-components copied to clipboard

`defaultExpanded` MUI prop doesn't work with SDS `Accordion` component

Open liaprins opened this issue 1 year ago • 1 comments

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:

  1. Go to the index.stories.tsx file for the Accordion component and open Storybook
  2. For one of the Accordion components, add the defaultExpanded prop
  3. Check that component in Storybook
  4. 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.

liaprins avatar Oct 19 '23 16:10 liaprins