Skip to content

FuzzySuggestModal

Extends

Type Parameters

T

Constructors

new FuzzySuggestModal()

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

Parameters

app: App

Returns

FuzzySuggestModal<T>

Inherited from

SuggestModal.constructor

Properties

app

app: App

Inherited from

SuggestModal.app


containerEl

containerEl: HTMLElement

Inherited from

SuggestModal.containerEl


contentEl

contentEl: HTMLElement

Inherited from

SuggestModal.contentEl


ctaEl

ctaEl: HTMLDivElement

Inherited from

SuggestModal.ctaEl


emptyStateText

emptyStateText: string

Inherited from

SuggestModal.emptyStateText


inputEl

inputEl: HTMLInputElement

Inherited from

SuggestModal.inputEl


limit

limit: number

Inherited from

SuggestModal.limit


modalEl

modalEl: HTMLElement

Inherited from

SuggestModal.modalEl


resultContainerEl

resultContainerEl: HTMLElement

Inherited from

SuggestModal.resultContainerEl


scope

scope: Scope

Inherited from

SuggestModal.scope


shouldAnimate

shouldAnimate: boolean

Whether the modal should animate

Inherited from

SuggestModal.shouldAnimate


shouldRestoreSelection

shouldRestoreSelection: boolean

Inherited from

SuggestModal.shouldRestoreSelection


titleEl

titleEl: HTMLElement

Inherited from

SuggestModal.titleEl


win

win: null | Window

Reference to the global Window object

Inherited from

SuggestModal.win

Methods

close()

close(): void

Returns

void

Inherited from

SuggestModal.close


getItems()

abstract getItems(): T[]

Returns

T[]


getItemText()

abstract getItemText(item): string

Parameters

item: T

Returns

string


getSuggestions()

getSuggestions(query): FuzzyMatch<T>[]

Parameters

query: string

Returns

FuzzyMatch<T>[]

Overrides

SuggestModal.getSuggestions


onChooseItem()

abstract onChooseItem(item, evt): void

Parameters

item: T

evt: MouseEvent | KeyboardEvent

Returns

void


onChooseSuggestion()

onChooseSuggestion(item, evt): void

Parameters

item: FuzzyMatch<T>

evt: MouseEvent | KeyboardEvent

Returns

void

Overrides

SuggestModal.onChooseSuggestion


onClose()

onClose(): void

Returns

void

Inherited from

SuggestModal.onClose


onNoSuggestion()

onNoSuggestion(): void

Returns

void

Inherited from

SuggestModal.onNoSuggestion


onOpen()

onOpen(): void

Returns

void

Inherited from

SuggestModal.onOpen


open()

open(): void

Returns

void

Inherited from

SuggestModal.open


renderSuggestion()

renderSuggestion(item, el): void

Parameters

item: FuzzyMatch<T>

el: HTMLElement

Returns

void

Overrides

SuggestModal.renderSuggestion


selectActiveSuggestion()

selectActiveSuggestion(evt): void

Parameters

evt: MouseEvent | KeyboardEvent

Returns

void

Inherited from

SuggestModal.selectActiveSuggestion


selectSuggestion()

selectSuggestion(value, evt): void

Parameters

value: FuzzyMatch<T>

evt: MouseEvent | KeyboardEvent

Returns

void

Inherited from

SuggestModal.selectSuggestion


setContent()

setContent(content): this

Parameters

content: string | DocumentFragment

Returns

this

Inherited from

SuggestModal.setContent


setInstructions()

setInstructions(instructions): void

Parameters

instructions: Instruction[]

Returns

void

Inherited from

SuggestModal.setInstructions


setPlaceholder()

setPlaceholder(placeholder): void

Parameters

placeholder: string

Returns

void

Inherited from

SuggestModal.setPlaceholder


setTitle()

setTitle(title): this

Parameters

title: string

Returns

this

Inherited from

SuggestModal.setTitle