I'm trying to dynamically set the onclick function of lightning web component button but it's not working. I've tried both "click" and "onclick"
JS:
const navButton = this.template.querySelector('.nav-button');
navButton.label = "Done";
navButton.addEventListener('onclick',this.handleShowMenu);
HTML:
<lightning-button
class="slds-m-left_small nav-button"
label="Next"
variant="brand"
onclick={handleNext}>
</lightning-button>