I need to create an accordion where all sections must be inactive on load and will only be activated when clicked.
Reading the documentation I saw that the first section will always be active by default.
Expands the specified accordion sections. Pass in a string or list of section names. Section names are case-sensitive. The first section in the accordion is expanded by default. To support multiple active sections, set allowMultipleSectionsOpen to true.
How could I create an accordion with all sections inactive when loading?
This is bothering me because I want to call a function only when a section is clicked and I'm trying to use the onsectiontoggle attribute, but it's always triggered when loading the accordion as there will always be an active section, the first one.
onsectiontoggle Fired when the accordion loads with at least one active section or when a section is toggled. Returns the openSections parameter containing an array of strings for the active section names.