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? I don't want to use Accordion for some reason.


<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());

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.