Skip to content

AbstractInputSuggest

Defined in: obsidian.d.ts:290

Attach to an <input> element or a <div contentEditable> to add type-ahead support.

Extends

Type Parameters

T

Constructors

new AbstractInputSuggest()

new AbstractInputSuggest<T>(app, textInputEl): AbstractInputSuggest<T>

Defined in: obsidian.d.ts:301

Accepts an <input> text box or a contenteditable div.

Parameters

app

App

textInputEl

HTMLDivElement | HTMLInputElement

Returns

AbstractInputSuggest<T>

Overrides

PopoverSuggest.constructor

Properties

app

app: App

Defined in: obsidian.d.ts:3332

Inherited from

PopoverSuggest.app


isOpen

isOpen: boolean

Defined in: src/obsidian/augmentations/PopoverSuggest.d.ts:10

Whether the suggestion popup is currently open and visible

Inherited from

PopoverSuggest.isOpen


limit

limit: number

Defined in: obsidian.d.ts:296

Limit to the number of elements rendered at once. Set to 0 to disable. Defaults to 100.


scope

scope: Scope

Defined in: obsidian.d.ts:3334

Inherited from

PopoverSuggest.scope


suggestEl

suggestEl: HTMLElement

Defined in: src/obsidian/augmentations/PopoverSuggest.d.ts:14

Suggestion container element

Inherited from

PopoverSuggest.suggestEl


suggestions

suggestions: SuggestionContainer<T>

Defined in: src/obsidian/augmentations/PopoverSuggest.d.ts:18

Handles selection and rendering of the suggestions

Inherited from

PopoverSuggest.suggestions

Methods

close()

close(): void

Defined in: obsidian.d.ts:3341

Returns

void

Inherited from

PopoverSuggest.close


getSuggestions()

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

Defined in: obsidian.d.ts:315

Parameters

query

string

Returns

T[] | Promise<T[]>


getValue()

getValue(): string

Defined in: obsidian.d.ts:312

Gets the value from the input element.

Returns

string


onSelect()

onSelect(callback): this

Defined in: obsidian.d.ts:322

Registers a callback to handle when a suggestion is selected by the user.

Parameters

callback

(value, evt) => any

Returns

this


open()

open(): void

Defined in: obsidian.d.ts:3339

Returns

void

Inherited from

PopoverSuggest.open


renderSuggestion()

abstract renderSuggestion(value, el): void

Defined in: obsidian.d.ts:3347

Render the suggestion item into DOM.

Parameters

value

T

el

HTMLElement

Returns

void

Inherited from

PopoverSuggest.renderSuggestion


selectSuggestion()

selectSuggestion(value, evt): void

Defined in: obsidian.d.ts:317

Parameters

value

T

evt

MouseEvent | KeyboardEvent

Returns

void

Overrides

PopoverSuggest.selectSuggestion


setValue()

setValue(value): void

Defined in: obsidian.d.ts:307

Sets the value into the input element.

Parameters

value

string

Returns

void