# MenubarBeforeValueChangeEvent (@salmonui/buttons/menu)

> The MenubarBeforeValueChangeEvent interface of @salmonui/buttons/menu: onBeforeValueChange; preventDefault() keeps the current menu (or none) open.

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

```ts
import type { MenubarBeforeValueChangeEvent } 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 MenubarBeforeValueChangeEvent extends MenubarValueChangeEvent {
    readonly value: string | null;
    readonly previousValue: string | null;
    readonly defaultPrevented: boolean;
    preventDefault(): void;
}
```

`onBeforeValueChange`; `preventDefault()` keeps the current menu (or none) open.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value: string \| null;` |  | The proposed open menu, or `null` to close. |
| `previousValue` | `readonly previousValue: string \| null;` |  |  |
| `defaultPrevented` | `readonly defaultPrevented: boolean;` |  |  |
| `preventDefault` | `preventDefault(): void;` |  |  |
| `reason` | `reason: MenubarValueChangeReason;` | inherited |  |
| `source` | `source: MenuSource;` | inherited |  |
