• Dallin Urness
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
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);
    }
})

 
I am making a custom aura component for a home page, and I would like to display what step along a path that particular project is at (ie. Pending Approval, Approved, In-Progress, Complete). However, I just can't find in the documentation what the path attribute is that I should include in my query in order to get  it's status. Thanks!