How to add tooltip to angular formly dropdown elements

144 Views Asked by At

I want to add tooltip to angular formly dropdown element, is there a way to solve this?

Tool tip should contain label - value of the dropdown elements. Is there any tooltip property which we can use under prop of formly field.

1

There are 1 best solutions below

0
Jacopo Sciampi On

You can use the title property to achieve this by putting it in the option tag:

<select>
  <option title="Lorem" value="Lorem">Lorem</value>
  <option value="Ipsum">Ipsum</value>
</select>

For a more "stylish" way to achieve this, you can have a look at the MatTooltip