SelectItemParams<T>
Options for selectItem.
Import:
import type { SelectItemParams } from '@mnaoumov/obsidian-lib/modals/select-item';Signature:
export interface SelectItemParams<T> extends ModalParamsBaseExtends: ModalParamsBase
Properties
| Property | Type | Description |
|---|---|---|
| app | App | An Obsidian app instance. (Inherited from ModalParamsBase) |
| cssClasses? | string[] | A CSS class to apply to the modal. (Inherited from ModalParamsBase) |
| items | T[] | A list of items to choose from. |
| itemTextFunction | (item: T) => string | Get the display text for each item |
| placeholder? | string | A placeholder text for the input field. |
| spellcheckMode? | SpellcheckMode | The mode deciding whether the search box is spell-checked. The default is what this modal has always done, so passing nothing changes nothing. It differs from the prompt() parameter's default on purpose: Obsidian builds every SuggestModal input with a hardcoded spellcheck="false" and never consults Editor > Spellcheck there, so Off — not FollowObsidianSetting — is the value that leaves the box exactly as Obsidian built it.Raise it for a picker whose box can NAME the thing it is about to create, rather than only find one. |
Links to this page: