Skip to content

Commit

Permalink
fix(tooltip): fix delayed tooltip display (#1156) (#1161)
Browse files Browse the repository at this point in the history
  • Loading branch information
DethAriel authored and valorkin committed Oct 26, 2016
1 parent c298c45 commit c6da387
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
ChangeDetectorRef,
ComponentRef,
Directive,
HostListener,
Expand Down Expand Up @@ -39,15 +40,18 @@ export class TooltipDirective {
public viewContainerRef: ViewContainerRef;
public componentsHelper: ComponentsHelper;

private changeDetectorRef: ChangeDetectorRef;
private visible: boolean = false;
private tooltip: ComponentRef<any>;

private delayTimeoutId: number;

public constructor(viewContainerRef: ViewContainerRef,
componentsHelper: ComponentsHelper) {
componentsHelper: ComponentsHelper,
changeDetectorRef: ChangeDetectorRef) {
this.viewContainerRef = viewContainerRef;
this.componentsHelper = componentsHelper;
this.changeDetectorRef = changeDetectorRef;
}

// todo: filter triggers
Expand Down Expand Up @@ -82,6 +86,7 @@ export class TooltipDirective {
.appendNextToLocation(TooltipContainerComponent, this.viewContainerRef, binding);
}

this.changeDetectorRef.markForCheck();
this.triggerStateChanged();
};

Expand Down

0 comments on commit c6da387

Please sign in to comment.