Skip to content

Commit ebd2669

Browse files
committed
fix(Tooltip): Hide the tooltip on destroying the target.
1 parent 66aed2a commit ebd2669

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

projects/igniteui-angular/src/lib/directives/tooltip/tooltip-target.directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
314314
* @hidden
315315
*/
316316
public ngOnDestroy() {
317+
this.hideTooltip();
317318
this.destroy$.next();
318319
this.destroy$.complete();
319320
}

projects/igniteui-angular/src/lib/directives/tooltip/tooltip.directive.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ describe('IgxTooltip', () => {
273273
flush();
274274

275275
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, true);
276-
debugger
276+
277277
fix.componentInstance.showButton = false;
278278
fix.detectChanges();
279279
flush();

projects/igniteui-angular/src/lib/test-utils/tooltip-components.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { IgxToggleActionDirective, IgxToggleDirective } from '../directives/togg
2222
})
2323
export class IgxTooltipSingleTargetComponent {
2424
@ViewChild(IgxTooltipDirective, { static: true }) public tooltip: IgxTooltipDirective;
25-
@ViewChild(IgxTooltipTargetDirective, { static: true }) public tooltipTarget: IgxTooltipTargetDirective;
25+
@ViewChild(IgxTooltipTargetDirective, { static: false }) public tooltipTarget: IgxTooltipTargetDirective;
2626
public cancelShowing = false;
2727
public cancelHiding = false;
2828
public showButton = true;

0 commit comments

Comments
 (0)