Skip to content

Commit 8f7dc84

Browse files
committed
fix(Tooltip): Hide the tooltip on destroying the target.
1 parent 674bcf0 commit 8f7dc84

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
@@ -276,7 +276,7 @@ describe('IgxTooltip', () => {
276276
flush();
277277

278278
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, true);
279-
debugger
279+
280280
fix.componentInstance.showButton = false;
281281
fix.detectChanges();
282282
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
@@ -23,7 +23,7 @@ import { IgxToggleActionDirective, IgxToggleDirective } from '../directives/togg
2323
})
2424
export class IgxTooltipSingleTargetComponent {
2525
@ViewChild(IgxTooltipDirective, { static: true }) public tooltip: IgxTooltipDirective;
26-
@ViewChild(IgxTooltipTargetDirective, { static: true }) public tooltipTarget: IgxTooltipTargetDirective;
26+
@ViewChild(IgxTooltipTargetDirective, { static: false }) public tooltipTarget: IgxTooltipTargetDirective;
2727
public cancelShowing = false;
2828
public cancelHiding = false;
2929
public showButton = true;

0 commit comments

Comments
 (0)