Skip to content

Commit 9fff92f

Browse files
crisbetotinayuangao
authored andcommitted
fix(datepicker): nested animation not working (#10355)
Fixes the calendar fade-in animation being blocked by its parent animation. Relates to #9134.
1 parent 34fe17e commit 9fff92f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/datepicker/datepicker-animations.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import {
1212
transition,
1313
trigger,
1414
AnimationTriggerMetadata,
15+
group,
16+
query,
17+
animateChild,
1518
} from '@angular/animations';
1619

1720
/** Animations used by the Material datepicker. */
@@ -23,7 +26,10 @@ export const matDatepickerAnimations: {
2326
transformPanel: trigger('transformPanel', [
2427
state('void', style({opacity: 0, transform: 'scale(1, 0)'})),
2528
state('enter', style({opacity: 1, transform: 'scale(1, 1)'})),
26-
transition('void => enter', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
29+
transition('void => enter', group([
30+
query('@fadeInCalendar', animateChild()),
31+
animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')
32+
])),
2733
transition('* => void', animate('100ms linear', style({opacity: 0})))
2834
]),
2935

0 commit comments

Comments
 (0)