# MenuActionEvent (@salmonui/buttons/menu)

> The MenuActionEvent interface of @salmonui/buttons/menu: onAction event: a chosen item. preventDefault() keeps the menu open (and stops link navigation).

Canonical: https://salmonui.dev/docs/reference/buttons/menu/MenuActionEvent

```ts
import type { MenuActionEvent } from '@salmonui/buttons/menu';
```

Entry index: https://salmonui.dev/docs/reference/buttons/menu (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/buttons/menu.md).

## Reference

Kind: interface

```ts
interface MenuActionEvent {
    readonly id: string;
    readonly item: MenuItemData | undefined;
    readonly source: MenuSource;
    readonly defaultPrevented: boolean;
    preventDefault(): void;
}
```

`onAction` event: a chosen item. `preventDefault()` keeps the menu open (and stops link navigation).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  |  |
| `item` | `readonly item: MenuItemData \| undefined;` |  | The data entry when the menu was built from `items`. |
| `source` | `readonly source: MenuSource;` |  |  |
| `defaultPrevented` | `readonly defaultPrevented: boolean;` |  |  |
| `preventDefault` | `preventDefault(): void;` |  |  |
