Skip to content

Setting.addDropdown method

Setting › addDropdown

Official

Add a dropdown component to the setting.

Signature:

addDropdown(cb: (component: DropdownComponent) => unknown): this

Parameters:

Parameter Type Description
cb (component: DropdownComponent) => unknown The callback to add the dropdown component.

Returns: thisThe setting.

Example:

setting.addDropdown((dropdown) => {
dropdown.addOption('foo', 'bar');
});