Closed xemlock closed 1 year ago
onClose is triggered on all ancestors of a closed panel, but should only be triggered on the closed panel itself.
onClose
Using nested example from https://michu2k.github.io/Accordion/:
new Accordion(['.nested-accordion-parent', '.nested-accordion-child'], { onClose: (el) => console.log('onClose',el) }
after closing "Nested 1" accordion we get the following in the browser console:
onClose <div class="ac js-enabled" id="ac-5">…</div> onClose <div class="ac js-enabled is-active" id="ac-4">…</div>
The second onClose shouln't be executed, because the parent panel is still open.
Hi @xemlock Thanks for letting me know that onClose() is not working as expected. The fix is already on the prerelease branch and will appear in the next update.
onClose
is triggered on all ancestors of a closed panel, but should only be triggered on the closed panel itself.Using nested example from https://michu2k.github.io/Accordion/:
after closing "Nested 1" accordion we get the following in the browser console:
The second onClose shouln't be executed, because the parent panel is still open.