Skip to content

SuggestModal

Extends

Extended by

Type Parameters

T

Implements

Constructors

new SuggestModal()

new SuggestModal<T>(app): SuggestModal<T>

Parameters

app: App

Returns

SuggestModal<T>

Overrides

Modal.constructor

Properties

app

app: App

Inherited from

Modal.app


containerEl

containerEl: HTMLElement

Inherited from

Modal.containerEl


contentEl

contentEl: HTMLElement

Inherited from

Modal.contentEl


ctaEl

ctaEl: HTMLDivElement


emptyStateText

emptyStateText: string


inputEl

inputEl: HTMLInputElement


limit

limit: number


modalEl

modalEl: HTMLElement

Inherited from

Modal.modalEl


resultContainerEl

resultContainerEl: HTMLElement


scope

scope: Scope

Inherited from

Modal.scope


shouldAnimate

shouldAnimate: boolean

Whether the modal should animate

Inherited from

Modal.shouldAnimate


shouldRestoreSelection

shouldRestoreSelection: boolean

Inherited from

Modal.shouldRestoreSelection


titleEl

titleEl: HTMLElement

Inherited from

Modal.titleEl


win

win: null | Window

Reference to the global Window object

Inherited from

Modal.win

Methods

close()

close(): void

Returns

void

Inherited from

Modal.close


getSuggestions()

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

Parameters

query: string

Returns

T[] | Promise<T[]>


onChooseSuggestion()

abstract onChooseSuggestion(item, evt): void

Parameters

item: T

evt: MouseEvent | KeyboardEvent

Returns

void


onClose()

onClose(): void

Returns

void

Inherited from

Modal.onClose


onNoSuggestion()

onNoSuggestion(): void

Returns

void


onOpen()

onOpen(): void

Returns

void

Inherited from

Modal.onOpen


open()

open(): void

Returns

void

Inherited from

Modal.open


renderSuggestion()

abstract renderSuggestion(value, el): void

Parameters

value: T

el: HTMLElement

Returns

void

Implementation of

ISuggestOwner.renderSuggestion

Inherited from

ISuggestOwner.renderSuggestion


selectActiveSuggestion()

selectActiveSuggestion(evt): void

Parameters

evt: MouseEvent | KeyboardEvent

Returns

void


selectSuggestion()

selectSuggestion(value, evt): void

Parameters

value: T

evt: MouseEvent | KeyboardEvent

Returns

void

Implementation of

ISuggestOwner.selectSuggestion

Inherited from

ISuggestOwner.selectSuggestion


setContent()

setContent(content): this

Parameters

content: string | DocumentFragment

Returns

this

Inherited from

Modal.setContent


setInstructions()

setInstructions(instructions): void

Parameters

instructions: Instruction[]

Returns

void


setPlaceholder()

setPlaceholder(placeholder): void

Parameters

placeholder: string

Returns

void


setTitle()

setTitle(title): this

Parameters

title: string

Returns

this

Inherited from

Modal.setTitle