Skip to content

Commit f0c8abc

Browse files
committed
fix: 🐛 fix reference
1 parent 9405848 commit f0c8abc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,8 @@ export class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnIn
233233
instance.show();
234234
}
235235
},
236-
onShown() {
237-
this.host.setAttribute('data-tippy-open', '');
238-
},
239236
onShow: instance => {
237+
instance.reference.setAttribute('data-tippy-open', '');
240238
this.zone.run(() => {
241239
const content = this.resolveContent();
242240
if (isString(content)) {
@@ -255,8 +253,8 @@ export class TippyDirective implements OnChanges, AfterViewInit, OnDestroy, OnIn
255253
}
256254
this.globalConfig.onShow?.(instance);
257255
},
258-
onHide() {
259-
this.host.removeAttribute('data-tippy-open');
256+
onHide(instance) {
257+
instance.reference.removeAttribute('data-tippy-open');
260258
},
261259
onHidden: instance => {
262260
this.destroyView();

0 commit comments

Comments
 (0)