I am trying to get my Lightning Accordion component to open all the sections at once. Per the Component library that can be done by having a List attribute
<aura:attribute name="activeSections" type="List" default="['A']"/>
and then setting that list attribute to activeSectionName
<lightning:accordion
allowMultipleSectionsOpen="true"
onsectiontoggle="{! c.handleSectionToggle }"
activeSectionName="{! v.activeSections }"
>
This would allow me to set multiple sections as "active" and have them open upon the component loading. I can not seem to get this functionality to work. I've set the list attribute with the same exact array that i iterate through to set the lightning:accordianSection name but no section open upon load. That wasn't working so i just hardcoded the A as default and then set one of the sections names to A but that didnt even open that section, so i can't get this functionality to perform at all with a list (i've set a single section to open with a string before).
I've checked that the sections are being named correctly with the below
handleSectionToggle : function (component, event, helper) {
var openSections = event.getParam('sectionName');
console.log(component.find("accordion").get('v.activeSectionName'));
}
And they match the items in the array i set to activeSections. And the lightning accordion is created after activeSections is defined