Skip to content

DropdownComponent

Defined in: obsidian.d.ts:1116

Extends

Constructors

new DropdownComponent()

new DropdownComponent(containerEl): DropdownComponent

Defined in: obsidian.d.ts:1125

Parameters

containerEl

HTMLElement

Returns

DropdownComponent

Overrides

ValueComponent.constructor

Properties

changeCallback()?

optional changeCallback: (value) => void

Defined in: src/obsidian/augmentations/Components/DropdownComponent.d.ts:9

The function that’s called after changing the value of the component.

Parameters

value

string

Returns

void

disabled

disabled: boolean

Defined in: obsidian.d.ts:423

Inherited from

ValueComponent.disabled


selectEl

selectEl: HTMLSelectElement

Defined in: obsidian.d.ts:1120

Methods

addOption()

addOption(value, display): this

Defined in: obsidian.d.ts:1133

Parameters

value

string

display

string

Returns

this


addOptions()

addOptions(options): this

Defined in: obsidian.d.ts:1137

Parameters

options

Record<string, string>

Returns

this


getValue()

getValue(): string

Defined in: obsidian.d.ts:1141

Returns

string

Overrides

ValueComponent.getValue


onChange()

onChange(callback): this

Defined in: obsidian.d.ts:1149

Parameters

callback

(value) => any

Returns

this


registerOptionListener()

registerOptionListener(listeners, key): this

Defined in: obsidian.d.ts:4219

Parameters

listeners

Record<string, (value?) => string>

key

string

Returns

this

Inherited from

ValueComponent.registerOptionListener


setDisabled()

setDisabled(disabled): this

Defined in: obsidian.d.ts:1129

Parameters

disabled

boolean

Returns

this

Overrides

ValueComponent.setDisabled


setValue()

setValue(value): this

Defined in: obsidian.d.ts:1145

Parameters

value

string

Returns

this

Overrides

ValueComponent.setValue


then()

then(cb): this

Defined in: obsidian.d.ts:428

Facilitates chaining

Parameters

cb

(component) => any

Returns

this

Inherited from

ValueComponent.then