Skip to content

ValueComponent<T>

Official

A value component.

Import:

import { ValueComponent } from 'obsidian';

Signature:

export class ValueComponent<T> extends BaseComponent

Extends: BaseComponent

Constructor

new ValueComponent()

Constructor.

To get the constructor instance, use getValueComponentConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
disabledbooleanWhether the component is disabled.
(Inherited from BaseComponent)

Methods

MethodReturnsDescription
getValue()TGet the value of the component.
registerOptionListener(listeners, key)thisRegister an option listener.
setDisabled(disabled)thisSets the disabled state of the component.
(Inherited from BaseComponent)
setValue(value)thisSet the value of the component.
then(cb)thisFacilitates chaining.
(Inherited from BaseComponent)

Links to this page: