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 {Actions, type IComboBox, type IComboBoxItem, type 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,
}

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).