You need to sign in to do that
Don't have an account?
Dallin Urness
When creating a lightning:tree component, how can I pass in html to the "label" inside of the json and have it be read as such?
When creating a lightning:tree, I would like to style the elements that are inside the tree, but when passed through the json they don't seem to be read as html, but just as a string. Is there any way to make it recognize it as html?
//Aura component <aura:component> <aura:attribute name="keyResult" type="Key_Result__c"/> <aura:handler name="init" value="{!this}" action="{!c.init}"/> <aura:attribute name="items" type="object" access="PRIVATE"/> <lightning:tree items="{! v.items }" header=""/> </aura:component> //js controller ({ init: function(cmp) { var items = [{ "label": "More Information", "name": "1", "expanded": false, "items": [{ "label": "<p style=\"color:red;\"> " + cmp.get("v.keyResult.Percent_Complete__c") + "<\/p>", "name": "2", "expanded": false, "items": [] }] }]; cmp.set('v.items', items); } })