@companion-module/base
    Preparing search index...

    Interface CompanionInputFieldMultiDropdown<TKey, TChoiceId>

    A multi-select dropdown input field

    Available for actions/feedbacks/config

    {
    id: 'val',
    type: 'multidropdown',
    label: 'Select name',
    choices: [
    { id: 'bob', label: 'Bob' },
    { id: 'sally', label: 'Sally' },
    ],
    default: ['bob']
    }
    interface CompanionInputFieldMultiDropdown<
        TKey extends string = string,
        TChoiceId extends JsonValue = string | number,
    > {
        allowInvalidValues?: boolean;
        choices: DropdownChoice<TChoiceId>[];
        default: TChoiceId[];
        description?: string;
        disableAutoExpression?: boolean;
        expressionDescription?: string;
        id: TKey;
        isVisibleExpression?: string;
        label: string;
        maxSelection?: number;
        minChoicesForSearch?: number;
        minSelection?: number;
        sortSelection?: boolean;
        tooltip?: string;
        type: "multidropdown";
    }

    Type Parameters

    • TKey extends string = string
    • TChoiceId extends JsonValue = string | number

    Hierarchy (View Summary)

    Index

    Properties

    allowInvalidValues?: boolean

    Enabling this will tell companion to validate the value of this field against the definition of the field. If the computed value for this option does not match the validation rules, it will be passed through unchanged. If this is not set, then any invalid value will result in the action/feedback being skipped entirely. Note: This only applies when in expression mode.

    The possible choices

    default: TChoiceId[]

    The default selected values

    description?: string

    A longer description/summary/notes for this field

    disableAutoExpression?: boolean

    Whether to disable support for toggling this field to be an expression Danger: Be careful if setting this to true for an existing option, if the user has already defined an expression for this, it will no longer be parsed and will break their configuration.

    expressionDescription?: string

    An alternate description to show when the field is in expression mode. This will replace the normal description

    id: TKey

    The unique id of this input field within the input group

    isVisibleExpression?: string

    A companion expression to check whether this input should be visible, based on the current options selections within the input group

    This is the same syntax as other expressions written inside of Companion. You can access a value of the current options using $(options:some_field_id). Note: you can only reference fields which are set to disableAutoExpression here, as other fields can be expressions and frequently changing values

    label: string

    The label of the field

    maxSelection?: number

    The maximum number of selected values

    minChoicesForSearch?: number

    The minimum number of entries the dropdown must have before it allows searching

    minSelection?: number

    The minimum number of selected values

    sortSelection?: boolean

    If true, the ui should sort the selected values by the order they appear in the choices array Any custom values will be sorted alphabetically at the end of the list

    tooltip?: string

    A hover tooltip for this field

    type: "multidropdown"

    The type of this input field