About this question
Trying to loop over all the expandable steps in this example but when I run the code below I get this error:this.template.querySelectorAll(...).addEventListener is not a function import { LightningElement } from 'lwc'; export default class AddProductWizard extends LightningElement { renderedCallback(){ this.template.querySelectorAll('.slds-setup-assistant').addEventListener('click',this.handleClick); } handleClick(e){ console.log("Clicked " + this.id); } }
What is reason behind getting error “addeventlistener is not a function”. Any help would be appreciated