Skip to content

Commit f9776c6

Browse files
author
Matt Lewis
committed
fix(tooltip): avoid ExpressionChangedAfterItHasBeenCheckedError when sometimes showing the tooltip
Fixes #196
1 parent 3fa2e80 commit f9776c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/directives/calendarTooltip.directive.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ export class CalendarTooltipDirective implements AfterViewChecked, OnDestroy {
149149
}
150150

151151
ngAfterViewChecked(): void {
152-
this.positionTooltip();
152+
// setTimeout is a fix for https://github.com/mattlewis92/angular-calendar/issues/196
153+
setTimeout(() => {
154+
this.positionTooltip();
155+
});
153156
}
154157

155158
ngOnDestroy(): void {

0 commit comments

Comments
 (0)