You need to sign in to do that
Don't have an account?
rtrigg
How to add tooltips to lightning:input fields?
Is there an easy way to add tooltips to lightning:input fields? My goal is to have a small lightning:icon wedged right in front of the input field's label, which when you hover over it, displays a tooltip with text from a component attribute, v.hoverText, or some such. A couple of questions:
Do the new base components support tooltips at all? I tried adding “title=” but I get no-such-attribute error. I found documentation for a lightning:tooltip tag (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_tooltip.htm), but using it in a component throws a no-such-component error.
I can follow the SLDS documentation to build an icon (without using lightning:icon) and give it a tooltip, but how do I get that icon to be on the same line with the lightning:input field’s label? Do I need fancy css to undo the natural linebreak that occurs between components?
Thanks!
- Randy
Do the new base components support tooltips at all? I tried adding “title=” but I get no-such-attribute error. I found documentation for a lightning:tooltip tag (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_tooltip.htm), but using it in a component throws a no-such-component error.
I can follow the SLDS documentation to build an icon (without using lightning:icon) and give it a tooltip, but how do I get that icon to be on the same line with the lightning:input field’s label? Do I need fancy css to undo the natural linebreak that occurs between components?
Thanks!
- Randy
https://developer.salesforce.com/docs/component-library/bundle/lightning:helptext/example#lightningcomponentdemo:exampleHelptextIcon