Reputation: 1562
Is it possible to load the q-tooltip text dynamically?
What property to use?
In my example, what is the correct property to use instead of :value (this property does not exist in the q-tooltip and is for demonstration only)?
<q-item-section avatar>
<q-icon :name="typeIcon(item.type_item)" />
<q-tooltip :value="tooltipIcon(item.type_item)" transition-show="scale" transition-hide="scale" content-class="bg-primary" />
</q-item-section>
Upvotes: 0
Views: 724
Reputation: 845
You can just use your method inside of the q-tooltip
tags to set text. I don't see any problem with that:
<q-tooltip>
{{ tooltipIcon(item.type_item) }}
</q-tooltip>
Upvotes: 1