ComboBox

Custom combo box input.

Interface: IComboBox.

See the parameters of this component in storybook.

Combo box

To create a combo box option, use IComboBoxItem.

Example
import {IComboBox, IComboBoxItem, Actions, IMessage} from "@onlyoffice/docspace-plugin-sdk";

const options: IComboBoxItem[] = [
    {"key": "auto", "label": "Auto"},
    {"key": "en", "label": "English"},
    {"key": "es", "label": "Español"},
    {"key": "eu", "label": "Euskara"},
];

const onSelect = (option: IComboBoxItem) => {
    comboBox.selectedOption = option;

    const message: IMessage = {
        "actions": [Actions.updateProps],
        "newProps": langComboBox,
    };

    return message;
};

const comboBox: IComboBox = {
    options,
    "selectedOption": options[0],
    onSelect,
    "scaled": true,
    "dropDownMaxHeight": 400,
    "directionY": "both",
    "scaledOptions": true,
};