Interface SortNodeParameters

Source
interface SortNodeParameters {
    code?: string;
    options?: { disableDotNotation?: boolean };
    sortFieldsUi?: {
        sortField: {
            fieldName: string;
            order?: "ascending" | "descending";
        }[];
    };
    type?: "simple"
    | "random"
    | "code";
}

Properties§

Source§

readonly code?: string

Javascript code to determine the order of any two items Default: "// The two items to compare are in the variables a and b\n\t// Access the fields in a.json and b.json\n\t// Return -1 if a should go before b\n\t// Return 1 if b should go before a\n\t// Return 0 if there's no difference\n\n\tfieldName = 'myField';\n\n\tif (a.json[fieldName] < b.json[fieldName]) {\n\treturn -1;\n\t}\n\tif (a.json[fieldName] > b.json[fieldName]) {\n\treturn 1;\n\t}\n\treturn 0;" Type options: {"alwaysOpenEditWindow":true,"editor":"jsEditor","rows":10}

Source§

readonly options?: { disableDotNotation?: boolean }

Default: {}

Source§

readonly sortFieldsUi?: {
    sortField: {
        fieldName: string;
        order?: "ascending" | "descending";
    }[];
}

The fields of the input items to sort by Default: {} Type options: {"multipleValues":true}

Source§

readonly type?: "simple" | "random" | "code"

The type of sorting to perform Default: "simple"