angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.35k stars 6.74k forks source link

[Tabs] Dynamic height does not work when content has changed #3191

Open Ploppy3 opened 7 years ago

Ploppy3 commented 7 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Tabs should transition height properly when content is added dynamically.

What is the current behavior?

Adding content to a tab does not modify the 'base animation height' resulting in weird animations.

What are the steps to reproduce?

http://plnkr.co/edit/Sccmy7os1nuaELrradRv?p=preview http://plnkr.co/edit/ZSBCT8P9xCi04rrKSCu3?p=preview https://stackblitz.com/edit/angular-humdjf?file=src%2Fapp%2Fapp.component.html Add content dynamically and change tab.

Is there anything else we should know?

Documentation is missing for dynamicHeight on material.angular.io

andrewseguin commented 7 years ago

Thanks for the heads up about documentation, and for providing a good example in plunker. Will take a look into this

leocaseiro commented 6 years ago

Plunker updated with Angular Material 5.0.0-rc http://plnkr.co/edit/knB7FM?p=preview

Ploppy3 commented 6 years ago

Updated demo : https://stackblitz.com/edit/angular-humdjf?file=src%2Fapp%2Fapp.component.html

italodeandra commented 5 years ago

Hey, have you found any workaround?

simeyla commented 5 years ago

@italoandrade the demo works well for me. What problem are you seeing?

italodeandra commented 5 years ago

It must have been something I did wrong then.. Iā€™m not using it anymore, so thanks anyway.. āœŒšŸ»

On Fri, 22 Mar 2019 at 7:37 PM simeyla notifications@github.com wrote:

@italoandrade https://github.com/italoandrade the demo https://stackblitz.com/edit/angular-humdjf?file=src%2Fapp%2Fapp.component.html works well for me. What problem are you seeing?

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/material2/issues/3191#issuecomment-475804961, or mute the thread https://github.com/notifications/unsubscribe-auth/ASVasigGRL0Ua4BuRaBcqo2D0FkIs6Zzks5vZVsogaJpZM4MFgU3 .

Twazny commented 2 years ago

Hi, I also have this problem. It is still reproducible in @Ploppy3 demo.

Steps:

  1. Click 10 times "Add content dynamically" button
  2. Go to second tab "Tab 2". You can notice that height of current tab "Tab 1" is instatly shrinked to initial size and then starts transition animation to second tab.
  3. Click 10 times "Add content dynamically" button on second tab.
  4. Go to first tab "Tab 1". Now it is even more visible, becase "Tab 2" also instantly shrinks and then starts growing to size of first tab during transition.

Next transitions have correct animations. Problem occurs only during first transition after tab content (and its height) was changed.