Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Tree View
Link to Figma: tba
Overview
- The Dynamic Tree View component displays data in a collapsible hierarchical tree structure.
- It allows users to explore nested information through parent-child relationships.
- The component supports navigation and selection of nodes within the hierarchy.
- It is useful for representing structures such as organizations, file systems, and categories.
[IMAGE PLACEHOLDER: Tree View showing collapsed and expanded parent-child nodes] 
Specs
Tokens
| Token | Description |
|---|---|
| displayName | Display name of the component in the structure panel |
| displayExpression | Field from data shown as text in tree nodes |
| keyExpression | Field used as unique identifier for each node |
| childrenExpression | Field containing child items for each node |
| selectionMode | Determines how users can select nodes |
| showCheckBoxesMode | Controls how checkboxes are displayed |
| selectNodesRecursive | Selects child nodes when parent is selected |
| selectByClick | Enables or disables selection on click |
| paddingClass | Configures padding around the component |
| dataSourceId | ID of the data source for retrieving tree data |
| getEntityCollectionHttpRequestParametersMap | Configures HTTP parameters for fetching data |
| events | Configurable events for the component |
| ON_TREE_ITEM_CLICK (Events) | Triggered when a node is clicked |
| ON_INIT (Events) | Triggered when the component initializes |
| ON_DESTROY (Events) | Triggered when the component is destroyed |
| visibilityPolicySetId | Determines visibility based on policy sets |
| displayConditions | Conditions for dynamically showing the component |
| id | Unique identifier for programmatic access |
| dataTestId | Testing hook ID for automated tests |
| enableAsHotspot | Enables the component as a guided tour hotspot |
| guidedTourHotSpotTitle | Title for guided tour hotspot (multi-language) |
| guidedTourHotSpotDescription | Description for guided tour hotspot (multi-language) |
...
- dataSourceId – Specifies the data source ID for retrieving tree data. For example, "api/categories" connects the tree view to a categories API endpoint.
- getEntityCollectionHttpRequestParametersMap – Configures HTTP parameters for data fetching. This object maps additional parameters needed for the data request, such as filters or sorting options. For example, {"headers": {"Content-Type": "application/json"}, "pathParams": {"tenantId": "{{tenantId}}"}} allows you to pass dynamic path parameters to the API.
[IMAGE PLACEHOLDER: Tree View structure with parent-child nodes, display conditions, event handling, and mapped fields]
Styling
(Configured in General Properties)
...
- showCheckBoxesMode – Controls how checkboxes are displayed in the tree view. Options include "none" (no checkboxes), "normal" (checkboxes shown for all nodes), or "selectAll" (includes a select all checkbox). For example, using "selectAll" is helpful when users need to select multiple items in a permissions tree.
- paddingClass – Configures the padding around the component using CSS classes. For example, "p-4" adds medium padding on all sides of the tree view, while "px-3 py-2" adds different horizontal and vertical padding. Proper padding ensures the tree view has adequate spacing within its container.
[IMAGE PLACEHOLDER: Tree View with display name, checkboxes, and padding highlighted] 
Actions & Variants
...
(Configured in Visual Properties)
selectionMode — Determines how users can select nodes in the tree. Options include "single" (only one node can be selected at a time), "multiple" (multiple nodes can be selected simultaneously), or null (no selection allowed). For example, setting to "multiple" allows users to select several categories in a product catalog
tree. selectNodesRecursive — Determines if selecting a parent node automatically selects all its child nodes. When set to true, clicking a parent node selects all its children recursively, which is useful for operations that apply to entire branches of thetree.
selectByClick — Enables or disables node selection when clicking on a node. When set to true, users can select a node by clicking anywhere on it; when false, they must use checkboxes (if enabled) to select nodes. This provides flexibility in how users interact with the tree.
...

selectNodesRecursive — Determines if selecting a parent node automatically selects all its child nodes. When set to true, clicking a parent node selects all its children recursively, which is useful for operations that apply to entire branches of the tree.

Tests
(Configured in Testing Hooks)
...
- visibilityPolicySetId — Determines the visibility of the component based on specified policy sets. For example, setting to "categoryAdminPolicy" restricts the tree view to users with category management privileges. This enables role-based access control for the component, ensuring only authorized users can see and interact with certain hierarchical data.
Links
- Link to Figma: tba
- Live style guide: https://e1-dev.k8s.myapp.de/live-style-guide/id2/9-tree
Guidelines
Data Format
The tree view component expects a hierarchical data structure or a flat structure that can be converted to a hierarchy.
...
| Do | Don’t | Article setting(s) | |||
|---|---|---|---|---|---|
| Use stable unique keys for nodes. | Use labels or array indices as identifiers. | keyExpression | |||
| Map human-readable text to nodes. | Surface internal IDs or verbose blobs as labels. | displayExpression | |||
Set selectionMode: "single" for navigation trees. | Allow multi-select when only one target makes sense. | selectionMode | |||
| Show checkboxes for multi-select tasks. | Force multi-select without visible affordances. | showCheckBoxesMode, selectionMode | |||
Enable selectNodesRecursive for branch actions. | Make users select every child manually. | selectNodesRecursive | |||
| Require checkbox-only selection when precision matters. | Allow row-click selection that causes accidental picks. | selectByClick: false, showCheckBoxesMode | Filter at the source to limit payload. | Fetch unbounded datasets without parameters. | getEntityCollectionHttpRequestParametersMap, dataSourceId |
| Hide the Tree View when not applicable. | Leave an empty/irrelevant tree visible. | displayConditions | |||
| Restrict sensitive trees by policy. | Show structure and rely on downstream errors. | visibilityPolicySetId | Provide stable test hooks. | Target nodes by transient text in tests. | dataTestId, id |
Accessibility
- Programmatic names for nodes: Ensure meaningful labels by mapping
displayExpressionto human-readable text. - Explicit selection affordance for multi-select: Show checkboxes to convey state non-visually using
showCheckBoxesModewithselectionMode: "multiple". - Accidental-selection prevention: When precision is needed, disable row-click with
selectByClick: false. - Localized helper text for guided flows: If tours are used, provide localized titles/descriptions via
enableAsHotspot,guidedTourHotSpotTitle,guidedTourHotSpotDescription. - Deterministic test/a11y hooks: Expose stable handles for audit tooling with
dataTestIdandid. - Avoid color-only meaning: Convey selection and hierarchy via labels and checkbox presence using
displayExpressionandshowCheckBoxesMode.Predictable interactions: Establish selection behavior on init (e.g., setselectionModeandselectByClickinON_INIT) and keep it stable during a session. - Stable relationships: Use persistent identifiers so assistive tech can track nodes; configure
keyExpressionand hierarchical relations viachildrenExpression.