-2

As of now, when we use lightning:accordion, we will not be able to close a section. The first section will close when we open second section. But I have a requirement where I have to close the first section without opening the second one. How to achieve this?

1 Answer 1

1

You can use Lightning Accordion with multiple sections open. Which allow us to close the section without need to open another one

You need to just set an attribute to enable this.

<lightning:accordion
        allowMultipleSectionsOpen="true"
        onsectiontoggle="{! c.handleSectionToggle }"
        activeSectionName="{! v.activeSections }"
    >

enter image description here

You must log in to answer this question.

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