Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tooltip): fix delayed tooltip display (#1156) #1161

Merged
merged 1 commit into from
Oct 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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