Skip to content

doFolderStateChange Type documentation

(item: TreeItem, deleteChildrenOnCollapse: boolean, newState: string) => void
Function
Changes the folder state to a new state based on the old state. If a client calls this method, the same is responsible to load the children in case the new state is 'expanding'!!!
Parameters
item: TreeItem
If set to true, the children are deleted upon collapsing the item.
deleteChildrenOnCollapse: boolean
newState?: string

Types Documentation

Defines the data for a tree item. All properties are optional.
Properties
Indicates if the item is active, the last clicked item is active always; only one item can be active.
active?: boolean
Defines the content of the optional badge. Should be a number or something like "100+". If undefined or empty string, no badge is displayed.
badge?: (string | number)
Defines the background color of the badge. Use the status color names as inputs.
See https://element.siemens.io/components/status-notifications/badges/

badgeColor?: string
The state of the checkbox/optionbox.
checked?: CheckboxState
The child tree items.
children?: TreeItem<T>[]
Any custom data that can be used in custom templates. Not shown by default.
customData?: T
The text shown for the tree item data field 1.
dataField1?: string
The text shown for the tree item data field 2.
dataField2?: string
The web font icon class name (e.g. element-building). The icon is shown on the left (in LTR) side of the label.
icon?: string
The text shown for the tree item label (header).
label?: string
The hierarchy level of the node. This will be auto-calculated by the tree view control.
level?: number
The parent tree item. This will be automatically set by the tree view control.
parent?: TreeItem<T>
Indicates if the tree item is selectable or not.
selectable?: boolean
If the item is selected (note that the tree view component supports single and multi-selection).
selected?: boolean
If the tree item shall show a checkbox.
showCheckbox?: boolean
If the tree item shall show an optionbox.
showOptionbox?: boolean
The folder state of the tree item.
state?: TreeItemFolderState
The color of the state pipe; formatted as CSS value ('red' or '#FF0000' or 'rgb(255, 0, 0)').
stateIndicatorColor?: string
The name of the template to apply.
templateName?: string
("unchecked" | "checked" | "indeterminate")
The check box state of a tree item.
("collapsed" | "expanding" | "expanded" | "leaf")
The folder state of a tree item.

Except where otherwise noted, content on this site is licensed under MIT License.