Skip to content

bug(MatExpansionPanel): Panel Expanded in MatStepper regardless of [expanded] #27318

Closed
@DJayFreshBlock

Description

@DJayFreshBlock

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

6

Description

Expansion panels currently render with a flash of content when nested in MatStepper -- they always temporarily appear as expanded, regardless of what the "expanded" attribute is set to. After a moment, all expansion panels that have been explicitly set to closed collapse.

Reported fixed by #13870
However this is just when opened in a dialog without any other nesting

Reproduction

StackBlitz link: https://angular-issue13870-stepper-dialog.stackblitz.io
Steps to reproduce:

  1. Create a MatStepper component to contain an expansion panel
  2. Add a MatExpansionPanel
  3. Set [expanded]="false"

Expected Behavior

MatExpansionPanels currently render with a flash of content when nested -- they always temporarily appear as expanded, regardless of what the "expanded" attribute is set to. After a moment, all expansion panels that have been explicitly set to closed collapse.

Actual Behavior

MatExpansionPanels should appear as collapsed when the dialog opens when expanded=false instead of briefly appearing as expanded, then collapsing after a delay.

Environment

  • Angular: 14.2
  • CDK/Material: 14.2
  • Browser(s): Chrome
  • Operating System : Windows

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentanimationThis issue is related to Angular animations or CSS animationsarea: material/stepper

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions