Combobox

The ComboBox component is used internally for the DataForm UI.
It handles each input with dropdown, tags, formula configuration, etc. It is possible to use it without DataForm by passing options or optionFactories. Additionally, variablesSchema is supported.

Here is the example with static options and local state:

import { ComboBox, ComboBoxOption } from "@integration-app/react";

const staticOptions: ComboBoxOption[] = [
  {
    label: 'Option 1',
    value: 'option-1',
  },
  {
    label: 'Option 2',
    value: 'option-2',
  },
]

export function ComboboxExample() {
  const [value, setValue] = useState<unknown>(null)

  return (
    <ComboBox
      value={value}
      onChange={setValue}
      placeholder='Type here...'
      options={staticOptions}
    />
  )
}

Styling component parts

Styling is supported, see Components page for more details.

The ComboBox component is made of multiple smaller components, here is a list of parts for each:

Component:
dropdown

Part classNameDescription
dropdown__popover-containerMain container of a dropdown. Emits keyboard navigation events
dropdown__contentDropdown content container
dropdown__panelSection panel. Can be multiple. Can be nested
dropdown__search-inputSearch input element
dropdown__search-dividerDivider between search input and rest of elements
dropdown__listItems list container
dropdown__items-list-headerItems list header
dropdown__itemSingle list item container
dropdown__item-titleList item title
dropdown__no-options-headingHeading title for empty search result
dropdown__error-headingHeading for error when options failed to load
dropdown__error-heading-iconError heading icon
dropdown__info-headingHeading for unsupported states within the dropdown
dropdown__info-heading-iconInfo heading icon
dropdown__loading-item-containerList item skeleton container
dropdown__loading-item-iconList item icon skeleton
dropdown__loading-item-titleLoading item title skeleton