Skip to content

ToggleComponent

Extends

Constructors

new ToggleComponent()

new ToggleComponent(containerEl): ToggleComponent

Parameters

containerEl: HTMLElement

Returns

ToggleComponent

Overrides

ValueComponent.constructor

Properties

disabled

disabled: boolean

Inherited from

ValueComponent.disabled


toggleEl

toggleEl: HTMLElement

Methods

getValue()

getValue(): boolean

Returns

boolean

Overrides

ValueComponent.getValue


onChange()

onChange(callback): this

Parameters

callback

Returns

this


onClick()

onClick(): void

Returns

void


registerOptionListener()

registerOptionListener(listeners, key): this

Parameters

listeners: Record<string, (value?) => boolean>

key: string

Returns

this

Inherited from

ValueComponent.registerOptionListener


setDisabled()

setDisabled(disabled): this

Parameters

disabled: boolean

Returns

this

Overrides

ValueComponent.setDisabled


setTooltip()

setTooltip(tooltip, options?): this

Parameters

tooltip: string

options?: TooltipOptions

Returns

this


setValue()

setValue(on): this

Parameters

on: boolean

Returns

this

Overrides

ValueComponent.setValue


then()

then(cb): this

Facilitates chaining

Parameters

cb

Returns

this

Inherited from

ValueComponent.then