Interface WbNodeData

A plain object (dictionary) that represents a node instance.

interface WbNodeData {
    _treeId?: string;
    checkbox?: CheckboxOption;
    children?: WbNodeData[];
    classes?: string;
    colspan?: boolean;
    expanded?: boolean;
    icon?: IconOption;
    iconTooltip?: TooltipOption;
    key?: string;
    lazy?: boolean;
    radiogroup?: boolean;
    refKey?: string;
    selected?: boolean;
    statusNodeType?: NodeStatusType;
    title: string;
    tooltip?: TooltipOption;
    type?: string;
    unselectable?: boolean;
    [key: string]: unknown;
}

Indexable

  • [key: string]: unknown

    Other data is passed to node.data and can be accessed via node.data.NAME

Properties

_treeId?: string
checkbox?: CheckboxOption

Defines if the selected state is displayed as checkbox, radio button, or hidden. Defaults to WunderbaumOptions.checkbox.

children?: WbNodeData[]

Optional list of child nodes. If children is an empty array, the node is considered a leaf. If lazy is true and `children is undefined or null, the node, is considered unloaded. Otherwise, the node is considered a leaf.

classes?: string

Additional classes that are added to <div class='wb-row'>.

colspan?: boolean

Only show title in a single, merged column.

expanded?: boolean

Expand this node.

icon?: IconOption

Defaults to standard icons (doc, folder, folderOpen, ...) from WunderbaumOptions.iconMap. Can be overridden by WunderbaumOptions.icon.

iconTooltip?: TooltipOption

Tooltip for the node icon only. Defaults to WunderbaumOptions.iconTooltip.

key?: string

The node's key. Must be unique for the whole tree. Defaults to a sequence number.

lazy?: boolean

If true (and children are undefined or null), the node is considered lazy and WunderbaumOptions.lazyLoad is called when expanded.

radiogroup?: boolean

Make child nodes single-select radio buttons.

refKey?: string

Node's reference key. Unlike WunderbaumNode.key, this value may be non-unique. Nodes within the tree that share the same refKey are considered clones.

selected?: boolean

The node's selection status, typically displayed as a checkbox.

statusNodeType?: NodeStatusType

The node's status, typically displayed as merged single row.

title: string

The node's title. Will be html escaped to prevent XSS.

tooltip?: TooltipOption

Pass true to set node tooltip to the node's title. Defaults to WunderbaumOptions.tooltip.

type?: string

Inherit shared settings from the matching entry in InitWunderbaumOptions.types.

unselectable?: boolean

Set to true to prevent selection. Defaults to WunderbaumOptions.unselectable.