Interface SortByPropertyOptions

Possible values for WunderbaumNode.sortByProperty options argument.

interface SortByPropertyOptions {
    caseInsensitive?: boolean;
    colId?: string;
    deep?: boolean;
    nativeOrderPropName?: string;
    order?: SortOrderType;
    propName?: string;
    updateColInfo?: boolean;
}

Properties

caseInsensitive?: boolean

Sort string values case insensitive.

Default

false
colId?: string

Column ID as defined in tree.columns definition. Required if updateColInfo is true.

deep?: boolean

Sort descendants recursively.

Default

true
nativeOrderPropName?: string

Sort by this property if order is undefined. See also WunderbaumNode.resetNativeChildOrder.

Default

_nativeIndex.

Sort order.

Default

Use value from column definition (rotated).
propName?: string

The name of the node property that will be used for sorting.

Default

use the colId as property name.

updateColInfo?: boolean

Rotate sort order (asc -> desc -> none) before sorting. Update the sort icons in the column header Note: Sorting is done in-place. There is no 'unsorted' state, but we can call setCurrentSortOrder() to renumber the node._sortIdx property, which will be used as sort key, when order is undefined.

Default

false