Skip to content

Commit

Permalink
fix(tooltip): avoid ExpressionChangedAfterItHasBeenCheckedError when …
Browse files Browse the repository at this point in the history
…sometimes showing the tooltip

Fixes #196
  • Loading branch information
Matt Lewis committed May 12, 2017
1 parent 3fa2e80 commit f9776c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/directives/calendarTooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ export class CalendarTooltipDirective implements AfterViewChecked, OnDestroy {
}

ngAfterViewChecked(): void {
this.positionTooltip();
// setTimeout is a fix for https://github.com/mattlewis92/angular-calendar/issues/196
setTimeout(() => {
this.positionTooltip();
});
}

ngOnDestroy(): void {
Expand Down

0 comments on commit f9776c6

Please sign in to comment.