0

I checked here https://www.lightningdesignsystem.com/components/tree-grid/#site-main-content that there is an option to "When a branch doesn't have children, apply slds-is-disabled to the corresponding slds-button_icon element." but where should I add this "slds-is-disabled"???

I tried to add here, but its not working

<lightning-tree-grid class="slds-is-disabled"
            columns={gridColumns}
            data={gridData}
            key-field="xxx"
            onrowselection={handleSelection}
            ontoggle={handleRowToggle}>
</lightning-tree-grid>

should I have to add something in my JS code?

2
  • 2
    Could you please share your code and explain where you have tried to add it? Aug 6, 2020 at 14:52
  • sure<lightning-tree-grid class="slds-is-disabled" columns={gridColumns} data={gridData} key-field="xxx" onrowselection={handleSelection} ontoggle={handleRowToggle}> </lightning-tree-grid>
    – vp3
    Aug 6, 2020 at 16:16

1 Answer 1

0

That's the behaviour implemented in lightning-tree-grid. You don't have to add anything else. If you take a look at the basic example in the documentation you'll see that the first row doesn't have the chevron, because it has no children:

enter image description here

The instructions for creating a tree grid with SLDS would apply if you weren't using the lightning-tree-grid base component for any reason. Makes sense?

1
  • yes! i found out that the problem is in the way im getting the data. thanks!
    – vp3
    Aug 7, 2020 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .