Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

ChannelComboBox

Selects a DARTWIC channel and, optionally, one of its fields.

Import

import { ChannelComboBox } from "@dartwic/interface-sdk/ui";

Declaration

export const ChannelComboBox: HostComponent<ChannelComboBoxProps>;

ChannelComboBoxProps

Props for the host channel and field selector.

export interface ChannelComboBoxProps extends HostComponentProps {
    /** Initial `|channel|` or `|channel|:field` selection. */
    initialValue?: string;
    /** Controlled selection override. */
    overrideValue?: string;
    /** Called with the selected channel value path. */
    onSelect?: (channelValuePath: string) => void;
    /** Limits fields to readable or writable channel fields. */
    mode?: "read" | "write";
    /** Shows the field selector beside the channel selector. */
    showFieldSelector?: boolean;
    /** Empty-selection placeholder. */
    placeholder?: string;
    /** Classes applied to the channel selector. */
    channelComboboxClassName?: string;
    /** Classes applied to the field selector. */
    fieldComboboxClassName?: string;
}
PropTypeRequirementDescription
initialValuestringOptionalInitial |channel| or |channel|:field selection.
overrideValuestringOptionalControlled selection override.
onSelect(channelValuePath: string) => voidOptionalCalled with the selected channel value path.
mode"read" | "write"OptionalLimits fields to readable or writable channel fields.
showFieldSelectorbooleanOptionalShows the field selector beside the channel selector.
placeholderstringOptionalEmpty-selection placeholder.
channelComboboxClassNamestringOptionalClasses applied to the channel selector.
fieldComboboxClassNamestringOptionalClasses applied to the field selector.
classNamestringOptionalAdditional Tailwind or host CSS classes.
childrenHostNodeOptionalChild content rendered by the host component.
idstringOptionalOptional DOM identifier.
styleRecord<string, unknown>OptionalInline style values passed to the host component.