LWC Acordion - JS

PHOTO EMBED

Mon Jul 12 2021 12:10:45 GMT+0000 (Coordinated Universal Time)

Saved by @redflashcode

import { LightningElement } from 'lwc';

export default class LightningExampleAccordionBasic extends LightningElement {
    activeSectionMessage = '';

    handleToggleSection(event) {
        this.activeSectionMessage =
            'Open section name:  ' + event.detail.openSections;
    }

    handleSetActiveSectionC() {
        const accordion = this.template.querySelector('.example-accordion');

        accordion.activeSectionName = 'C';
    }
}
content_copyCOPY