Skip to content

Commit

Permalink
fix: 🐛 move data open to a better hool
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBasal committed Jan 5, 2023
1 parent 44e45f2 commit 6e68832
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/ngneat/helipopper/src/lib/tippy.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ export class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnIn
instance.show();
}
},
onShow: instance => {
onShown() {
this.host.setAttribute('data-tippy-open', '');
},
onShow: instance => {
this.zone.run(() => {
const content = this.resolveContent();
if (isString(content)) {
Expand All @@ -253,8 +255,10 @@ export class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnIn
}
this.globalConfig.onShow?.(instance);
},
onHidden: instance => {
onHide() {
this.host.removeAttribute('data-tippy-open');
},
onHidden: instance => {
this.destroyView();
this.zone.run(() => {
this.isVisible = false;
Expand Down

0 comments on commit 6e68832

Please sign in to comment.