Interface ModConfigFieldSelect

Represents a select configuration field that will be represented as a dropdown select element in the configuration UI.

interface ModConfigFieldSelect {
    defaultValue: ModConfigSingleValue;
    description?: string;
    id: string;
    name: string;
    options: {
        description?: string;
        label: string;
        value: ModConfigSingleValue;
    }[];
    overrideValue?: Binding<ModConfigSingleValue>;
    type: "select";
    visible?: Binding<boolean>;
}

Hierarchy

  • ModConfigFieldBase
    • ModConfigFieldSelect

Properties

defaultValue: ModConfigSingleValue

The default value of the select field.

description?: string

The description for the field that appears in a help tooltip.

id: string

The unique identifier of the configuration element.

name: string

The name of the field.

options: {
    description?: string;
    label: string;
    value: ModConfigSingleValue;
}[]

The options that the user can select from.

Type declaration

  • Optional description?: string

    The description of the option that appears underneath the label in the dropdown.

  • label: string

    The label of the option that will be displayed in the dropdown.

  • value: ModConfigSingleValue

    The value of the option that will be used when the user selects it.

overrideValue?: Binding<ModConfigSingleValue>

The override value of the select field. If this value is anything other than null, it will override the current value. If the value is overridden, it will also be read only.

type: "select"

The type of the configuration element.

visible?: Binding<boolean>

Determines if the field is visible or not.