Skip to content

SettingTab.setControlValue method

SettingTab › setControlValue

Official

Persist a new value for a control key. Called on user change of a control-type setting definition.

The default implementation writes to this.app.vault.setConfig. Override to persist elsewhere; pair with getControlValue.

Signature:

setControlValue(key: string, value: unknown): void | Promise<void>

Parameters:

Parameter Type Description
key string
value unknown

Returns: void | Promise<void>

Since: 1.13.0