Skip to main content

SuggestModal

Extends Modal

Implements ISuggestOwner<T>

Constructor​

constructor(app: App);

Properties​

limit​

limit: number

emptyStateText​

emptyStateText: string

inputEl​

inputEl: HTMLInputElement

resultContainerEl​

resultContainerEl: HTMLElement

Methods​

setPlaceholder​

setPlaceholder(placeholder: string): void;

setInstructions​

setInstructions(instructions: Instruction[]): void;

onNoSuggestion​

onNoSuggestion(): void;

selectSuggestion​

selectSuggestion(value: T, evt: MouseEvent | KeyboardEvent): void;

Called when the user makes a selection.

getSuggestions​

abstract getSuggestions(query: string): T[] | Promise<T[]>;

renderSuggestion​

abstract renderSuggestion(value: T, el: HTMLElement): any;

Render the suggestion item into DOM.

onChooseSuggestion​

abstract onChooseSuggestion(item: T, evt: MouseEvent | KeyboardEvent): any;