selectOption<T>
Displays a modal in Obsidian offering a fixed set of labelled options as buttons.
Import:
import { selectOption } from 'obsidian-dev-utils/obsidian/modals/select-option';Signature:
function selectOption(params: SelectOptionParams<T>): Promise<T | null>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | SelectOptionParams<T> | The parameters for the modal. |
Returns: Promise<T | null> — A Promise that resolves with the chosen option’s value, or null if the modal was dismissed without a choice.
Links to this page: