Interface ColumnDefinition

Column type definitions.

interface ColumnDefinition {
    _ofsPx?: number;
    _weight?: number;
    _widthPx?: number;
    classes?: string;
    customWidthPx?: number;
    filterActive?: boolean;
    filterable?: boolean;
    headerClasses?: string;
    html?: string;
    id: string;
    menu?: boolean;
    minWidth?: string | number;
    resizable?: boolean;
    sortOrder?: SortOrderType;
    sortable?: boolean;
    title: string;
    tooltip?: string;
    width?: string | number;
    [key: string]: unknown;
}

Indexable

[key: string]: unknown

Properties

_ofsPx?: number
_weight?: number
_widthPx?: number
classes?: string

Optional class names that are added to all span.wb-col header AND data elements of that column. Separate multiple classes with space.

customWidthPx?: number

Optional custom column width when user resized by mouse drag. Default: unset.

filterActive?: boolean

. Default: inactive.
Note: The actual filtering must be implemented in the buttonClick() event.

filterable?: boolean

Display a 'filter' button in the column header. Default: false.
Note: The actual filtering must be implemented in the buttonClick() event.

Default

false (or global tree option columnsFilterable)

Since

0.11.0

headerClasses?: string

If headerClasses is a set, it will be used for the header element only (unlike classes, which is used for body and header cells). Separate multiple classes with space.

html?: string

Optional HTML content that is rendered into all span.wb-col elements of that column.

id: string

Column ID as defined in tree.columns definition ("*" for title column).

menu?: boolean

Display a menu icon that may open a context menu for this column. Note: The actual functionality must be implemented in the buttonClick() event.

Default

false (or global tree option columnsMenu)

See

WunderbaumOptions.columnsMenu.

Since

0.11.0

minWidth?: string | number

Only used for columns with a relative weight. Default: 4px.

resizable?: boolean

Allow user to resize the column.

Default

false (or global tree option columnsSortable)

See

WunderbaumOptions.columnsResizable.

Since

0.10.0

sortOrder?: SortOrderType

Optional custom column sort orde when user clicked the sort icon. Default: unset, e.g. not sorted.
Note: The actual sorting must be implemented in the buttonClick() event.

Since

0.11.0

sortable?: boolean

Display a 'sort' button in the column header. Default: false.
Note: The actual sorting must be implemented in the buttonClick() event.

Default

false (or global tree option columnsSortable)

See

WunderbaumOptions.columnsSortable.

Since

0.11.0

title: string

Column header (defaults to id)

tooltip?: string

Column header tooltip (optional)

width?: string | number

Column width or weight. Either an absolute pixel value (e.g. "50px") or a relative weight (e.g. 1) that is used to calculate the width inside the remaining available space. Default: "*", which is interpreted as 1.