Skip to content

AddSingleChoiceMenuItemsParams<T>

Parameters for addSingleChoiceMenuItems.

Import:

import type { AddSingleChoiceMenuItemsParams } from '@mnaoumov/obsidian-lib/menu';

Signature:

export interface AddSingleChoiceMenuItemsParams<T>

Properties

PropertyTypeDescription
currentValueTThe value checked when the menu opens.
menuMenuThe menu to add the items to.
onChange(value: T) => voidCalled with the chosen value when the user clicks an item.
optionsreadonly SingleChoiceMenuOption<T>[]The choices, in menu order.
section?stringThe menu section to put the items in.

Links to this page: