click
Description
fires on clicking an item of DropDown Menu or outside the menuParameters
- ev - event object
- context - object for which menu was called, optional
- action - object of selected menu item, empty if menu was closed by an outside click
- ev - native html event
Example
<script>
function clicked(ev){
const action = ev.action;
message = action ? `clicked on ${action.id}` : "closed";
}
</script>
<DropDownMenu {options} onclick={clicked}>
<Button type="primary">Click me</Button>
</DropDownMenu>
Related article: Catching the change of a clicked option
Related sample: Drop-down menu