Trilium Frontend API
    Preparing search index...

    Interface ListEditorParams

    interface ListEditorParams {
        allowEmpty?: boolean;
        autocomplete?: boolean;
        clearable?: boolean;
        defaultValue?: string;
        elementAttributes?: JSONRecord;
        emptyValue?: any;
        filterDelay?: number;
        filterFunc?: (
            term: string,
            label: string,
            value: string[],
            item: any,
        ) => any;
        filterRemote?: boolean;
        freetext?: boolean;
        itemFormatter?: (
            label: string,
            value: string,
            item: any,
            element: HTMLElement,
        ) => string;
        listOnEmpty?: boolean;
        mask?: string;
        maskAutoFill?: boolean;
        maskLetterChar?: string;
        maskNumberChar?: string;
        maskWildcardChar?: string;
        maxWidth?: boolean;
        multiselect?: boolean;
        placeholderEmpty?: string;
        placeholderLoading?: string;
        showListOnEmpty?: boolean;
        sort?: SortDirection;
        sortValuesList?: "desc" | "asc";
        values?: string | true | any[] | string[] | JSONRecord | LabelValue[];
        valuesLookup?: RowRangeLookup;
        valuesLookupField?: string;
        valuesURL?: string;
        verticalNavigation?: "table" | "editor" | "hybrid";
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowEmpty?: boolean
    autocomplete?: boolean
    clearable?: boolean
    defaultValue?: string
    elementAttributes?: JSONRecord
    emptyValue?: any
    filterDelay?: number
    filterFunc?: (term: string, label: string, value: string[], item: any) => any
    filterRemote?: boolean
    freetext?: boolean
    itemFormatter?: (
        label: string,
        value: string,
        item: any,
        element: HTMLElement,
    ) => string
    listOnEmpty?: boolean
    mask?: string

    Built-in editors based on input elements such as the input, number, textarea and autocomplete editors have the ability to mask the users input to restrict it to match a given pattern.

    This can be set by passing a string to the the mask option in the columns editorParams Each character in the string passed to the mask option defines what type of character can be entered in that position in the editor.

    • A - Only a letter is valid in this position
    • 9 - Only a number is valid in this position
    • * - Any character is valid in this position

    Any other character - The character in this position must be the same as the mask For example, a mask string of "AAA-999" would require the user to enter three letters followed by a hyphen followed by three numbers

    If you want to use the characters A, 9 or * as fixed characters then it is possible to change the characters looked for in the mask by using the maskLetterChar, maskNumberChar and maskWildcardChar options in the editorParams

    maskAutoFill?: boolean

    you are using fixed characters in your mask (any character other that A, 9 or *), then you can get the mask to automatically fill in these characters for you as you type by setting the maskAutoFill option in the editorParams to true.

    maskLetterChar?: string
    maskNumberChar?: string
    maskWildcardChar?: string
    maxWidth?: boolean
    multiselect?: boolean
    placeholderEmpty?: string
    placeholderLoading?: string
    showListOnEmpty?: boolean
    sortValuesList?: "desc" | "asc"
    values?: string | true | any[] | string[] | JSONRecord | LabelValue[]
    valuesLookup?: RowRangeLookup
    valuesLookupField?: string
    valuesURL?: string
    verticalNavigation?: "table" | "editor" | "hybrid"