context
Description
a context object related to the clicked menu itemType
object
Example
<script>
function clicked(ev){
const { context, action } = ev.detail;
if (action)
active[context] = action.id;
}
</script>
<Menu {options} on:click={clicked}/>
Details
When a user clicks on an item, Menu triggers the "click" event, where event.detail contains an object related to the clicked menu item.