Skip to content

Commit 4c66467

Browse files
author
Tobias Schweizer
committed
fix (MatCalendar): fix change detection for MatCalendarHeader
1 parent a88fecb commit 4c66467

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/lib/datepicker/calendar.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,16 @@ export class MatCalendarHeader implements OnDestroy {
4747
/** Subject that emits when the component has been destroyed. */
4848
private _destroyed = new Subject<void>();
4949

50-
private _intlChanges: Subscription;
51-
5250
constructor(@Host() public calendar: MatCalendar<any>,
53-
private _intl: MatDatepickerIntl,
51+
intl: MatDatepickerIntl,
5452
changeDetectorRef: ChangeDetectorRef) {
55-
this._intlChanges = _intl.changes.pipe(takeUntil(this._destroyed)).subscribe(
56-
() => changeDetectorRef.markForCheck()
57-
);
53+
intl.changes.pipe(takeUntil(this._destroyed)).subscribe(() => changeDetectorRef.markForCheck());
5854
}
5955

6056
ngOnDestroy() {
6157
this._destroyed.next();
6258
this._destroyed.complete();
6359
}
64-
6560
}
6661

6762
/**

0 commit comments

Comments
 (0)