Skip to content

Expansion panel in tab shows its content in collapsed state when tab become active #7916

@ipassynk

Description

@ipassynk

Bug, feature request, or proposal:

bug

What is the expected behavior?

content should be collapsed

What is the current behavior?

Expansion panel in tab shows its content in collapsed state when tab become active

What are the steps to reproduce?

  1. Have a tabs and each tab has an expansion panel.
  2. The first active tab shows the expansion panel correctly - collapsed state
  3. Click on the second tab
  4. Observe that the expended panel in the tab shows the content (it is not hidden)

https://stackblitz.com/edit/angular-material2-issue-vqp5mt

<mat-tab-group>
	<mat-tab label="1">

		<mat-expansion-panel>
			<mat-expansion-panel-header>
				header1
			</mat-expansion-panel-header>
			content1
		</mat-expansion-panel>

	</mat-tab>


	<mat-tab label="2">

		<mat-expansion-panel>
			<mat-expansion-panel-header>
				header2
			</mat-expansion-panel-header>
			content2
		</mat-expansion-panel>

	</mat-tab>
</mat-tab-group>

image

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

image

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions