Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add conditional tooltip using primeng?

Tags:

primeng

I am trying to add a conditional tooltip over a button. Using primeng tooltip component:

<div pTooltip="Please upload" style="display:inline-block;" tooltipPosition="top" 
   tooltipDisabled = "flag">
     <button class="btn btn-primary btn-xs"><i class="fa fa-check" 
     aria-hidden="true"></i></button>
</div>

It is not working.

However, tooltip without "tooltipDisabled" is working fine.

Can someone please help me?

like image 844
Virat Mishra Avatar asked Sep 18 '17 12:09

Virat Mishra


People also ask

How do you increase the width of a Primeng tooltip?

To change the width of your tooltip, you will have to touch the ui-tooltip-text which is a child of a container class you were trying to change. Make sure to apply that in styles. css at root of your project. If you want to apply it from your component, you will have to set ViewEncapsulation.


1 Answers

use [tooltipDisabled]="flag" instead

like image 174
BillF Avatar answered Oct 19 '22 11:10

BillF