Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mat-expansion-panel animates expanded to closed when nested in a mat-dialog #13936

Closed
WrongWayJerry opened this issue Nov 1, 2018 · 3 comments

Comments

@WrongWayJerry
Copy link

WrongWayJerry commented Nov 1, 2018

Bug, feature request, or proposal:

With Angular 7 the mat-expansion-panel when it is in a mat-dialog will "flash" from expanded to closed when the dialog is initially displayed.

What is the expected behavior?

Should behave like Angular 6 and should not show as expanded and then immediately close when a dialog is opened.

What is the current behavior?

When displaying a mat-dialog the expansion panel will display its contents expanded and then immediately close.

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

https://angular-wlrqxn.stackblitz.io

If you cannot open the sample add the following code to the mat-dialog example on the Angular 7 site - stackblitz example:

https://stackblitz.com/angular/koppvkvpmpdn?file=app%2Fdialog-overview-example-dialog.html

<div mat-dialog-content>
  <p>What's your favorite animal?</p>
  <mat-form-field>
    <input matInput [(ngModel)]="data.animal">
  </mat-form-field>
  <mat-expansion-panel>
        <mat-expansion-panel-header>
            <mat-panel-title>
                Hello
            </mat-panel-title>
        </mat-expansion-panel-header>
        <mat-card-content>
          <div>World!</div>
          <div>World!</div>
          <div>World!</div>
          <div>World!</div>
          <div>World!</div>
        </mat-card-content>
  </mat-expansion-panel>
</div>

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

The content of the expansion panel should not display if the panel is closed.

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

Angular 7,
Windows
Firefox and Chrome

Is there anything else we should know?

@manklu
Copy link

manklu commented Nov 1, 2018

Duplicate of #13870

@crisbeto
Copy link
Member

crisbeto commented Nov 2, 2018

Closing as a duplicate.

@crisbeto crisbeto closed this as completed Nov 2, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants