Skip to content

Commit 300c4f0

Browse files
committed
fix: onHide emit only if ref is not destroyed
1 parent d1d4e35 commit 300c4f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ngneat/helipopper/src/lib/tippy.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,13 +587,13 @@ export class TippyDirective implements OnChanges, AfterViewInit, OnInit {
587587
// "Unexpected emit for destroyed `OutputRef`".
588588
if (!this.destroyed) {
589589
this.isVisible.set(isVisible);
590+
this.onHide.emit();
590591
}
591592
this.visibleInternal.next(isVisible);
592593
if (this.visible.observed) {
593594
this.ngZone.run(() => this.visible.next(isVisible));
594595
}
595596
this.globalConfig.onHidden?.(instance);
596-
this.onHide.emit();
597597
}
598598

599599
private isOverflowing$() {

0 commit comments

Comments
 (0)