ToggleComponent
Defined in: obsidian.d.ts:4160
Extends
ValueComponent
<boolean
>
Constructors
new ToggleComponent()
new ToggleComponent(
containerEl
):ToggleComponent
Defined in: obsidian.d.ts:4169
Parameters
containerEl
Returns
Overrides
Properties
changeCallback()?
optional
changeCallback: (value
) =>void
Defined in: src/obsidian/augmentations/Components/ToggleComponent.d.ts:9
The function that’s called after changing the value of the component.
Parameters
value
boolean
Returns
void
disabled
disabled:
boolean
Defined in: obsidian.d.ts:423
Inherited from
toggleEl
toggleEl:
HTMLElement
Defined in: obsidian.d.ts:4164
Methods
getValue()
getValue():
boolean
Defined in: obsidian.d.ts:4177
Returns
boolean
Overrides
onChange()
onChange(
callback
):this
Defined in: obsidian.d.ts:4194
Parameters
callback
(value
) => any
Returns
this
onClick()
onClick():
void
Defined in: obsidian.d.ts:4190
Returns
void
registerOptionListener()
registerOptionListener(
listeners
,key
):this
Defined in: obsidian.d.ts:4219
Parameters
listeners
Record
<string
, (value
?) => boolean
>
key
string
Returns
this
Inherited from
ValueComponent
.registerOptionListener
setDisabled()
setDisabled(
disabled
):this
Defined in: obsidian.d.ts:4173
Parameters
disabled
boolean
Returns
this
Overrides
setTooltip()
setTooltip(
tooltip
,options
?):this
Defined in: obsidian.d.ts:4186
Parameters
tooltip
string
options?
Returns
this
setValue()
setValue(
on
):this
Defined in: obsidian.d.ts:4181
Parameters
on
boolean
Returns
this
Overrides
then()
then(
cb
):this
Defined in: obsidian.d.ts:428
Facilitates chaining
Parameters
cb
(component
) => any
Returns
this