Skip to content

Commit ad26f8a

Browse files
committed
refactor(tab-panel): animateChild for optional nested animations
1 parent 8a01652 commit ad26f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/coreui-angular/src/lib/tabs-2/tab-panel/tab-panel.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { animate, AnimationEvent, state, style, transition, trigger } from '@angular/animations';
1+
import { animate, animateChild, AnimationEvent, query, state, style, transition, trigger } from '@angular/animations';
22
import {
33
Component,
44
computed,
@@ -35,7 +35,7 @@ type VisibleChangeEvent = { itemKey: string | number; visible: boolean };
3535
state('show', style({ opacity: 1 })),
3636
state('hide', style({ opacity: 0 })),
3737
state('void', style({ opacity: 0 })),
38-
transition('* => *', [animate('150ms linear')])
38+
transition('* => *', [query('@*', [animateChild()], { optional: true }), animate('150ms linear')])
3939
])
4040
]
4141
})

0 commit comments

Comments
 (0)