function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vigneshwaran LoganathanVigneshwaran Loganathan 

Open Child Components in Same Section

I have a Component where I show list of Accounts using "lightning:verticalNavigation".. Now upon clicking one Account from this list, I would like to Open all its associated Contacts in same section.. How can I do that? 

User-added image
<aura:handler name="init" value="{!this}" action="{!c.doInit1}" />
 <aura:attribute name="items" type="Object"/>
 <aura:attribute name="items2" type="String" />

 <div class="slds-m-around_xx-small">  
                <lightning:verticalNavigation selectedItem="{!v.selectedaccId}"
                    <lightning:verticalNavigationSection label="Select Account">
                        <aura:iteration items="{!v.items}" var="clnt" indexVar="index">
                            <lightning:verticalNavigationItemIcon label="{!clnt.Name}" 
doInit1: function (cmp, event, helper) {
        var action = cmp.get("c.getTreeData1");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                cmp.set('v.items', response.getReturnValue());



ANUTEJANUTEJ (Salesforce Developers) 
Hi Vignweshwaran,


The above link has an implementation of using lightning:tree which could be useful for your use case can you try checking this once?

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

PriyaPriya (Salesforce Developers) 

Hi Vignehswaran,

Try using a lightning Tree grid inside  <lightning:verticalNavigationSection> iteration and assigned the grid data to the inner query of account.
e.g., data={}

kindly refer the below article on Lightning tree grid :- 

If the above information helps, please mark it as best answer so that it may help others in future. 


Priya Ranjan