I am trying to show the tooltip only on the click, so by default I disabled the tooltip, and when I click on the span I re enable the tooltip.
But the tooltip doesn't show, I have to move out my mouse and then move my mouse hover the span.
Here is my html template
<span (click)="onClick()" [tooltipDisabled]="tooltipDisabled" pTooltip="My tooltip"
tooltipPosition="top">My text</span>
And here is my typescript
export class MyComponent {
tooltipDisabled = true;
constructor() {
}
onClick() {
this.tooltipDisabled = false;
}
}
I also tried to dispatch and event based on the answer of this question but it doesn't work either.
Is there a solution to show the tooltip on my click ?