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