-
Notifications
You must be signed in to change notification settings - Fork 89
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
OnLeave animation causes mat-tab to be broken #33
Comments
Hi @Civetdelapin, Thanks for your contribution. I looked at your example and I'm not sure which scenario you want to achieve. Do you want to animate fadeIn/fadeOut tabs
If it's the first scenario, then maybe it's worth checking out version of mat-tab-group where the tab content is loaded lazily (when activated): example in stackblitz |
Hey, What I am trying to achieve, is I have a list of items in each tabs, wich I can delete and add elements from (that's where the animations must happend). It do not require the tab content to be loaded lazily as I do not want the animations to trigger when switching tabs. My problem is " Why the leave animation is called when switching tabs (maybe it's more an mat-tab issue...) ?" I updated the stackblitz to be more specific : stackblitz I tried with the tab where the content is loaded lazily, it's working great (event if it's not quite what I want, it is a great workaround). |
Hi @Civetdelapin, Talking about workarounds, if lazy loaded tab content is a viable workaround, and you wouldn't like to have list of items animated while switching between tabs, you can add a "dummy" onEnter animation on the parent element with: |
Hi @filipows, The stackblitz you just provided will do the trick for now, thank you very much for your help! |
OnLeave animations are called when you switch tabs but OnEnter animations are not called back when you reenter the same tab.
This makes the elements go invisible for ever.
I manage to reproduce the bug via stackblitz.
The text was updated successfully, but these errors were encountered: