click
Description
fires on clicking an item of DropDown Menu or outside the menuParameters
- ev - (object) a CustomEvent object
Example
<script>
function clicked(ev){
const action = ev.detail.action;
message = action ? `clicked on ${action.id}` : "closed";
}
</script>
<DropDownMenu {options} on:click={clicked}>
<Button type="primary">Click me</Button>
</DropDownMenu>
Related article: Catching the change of a clicked option
Related sample: Drop-down menu