Skip to main content
Version: Next

Tree

A generic, customizable tree. Author the nodes by hand with any icon, or bind a data hierarchy to it.

The Tree component as it renders with its default settings.The Tree component as it renders with its default settings.

Reach for it when you need:

  • A navigable equipment hierarchy
  • A structured picker driven by a query

Component name: TreeView · Category: Display

In the palette: A generic, customizable tree — author nodes with any icon, or bind a data hierarchy

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
sourceenumauthoredauthored = build the tree in the editor. data = map a bound array ({{query.tree}}) or static rows. Options: authored · data.
nodesarray[{"id":"n1","label":"Group A","icon":"Folder","children":[{"… (truncated)The tree nodes. Each has its own label, icon, colours and children.
dataarray[]Bind to {{query.tree}} or a static array. Nested (children[]) or flat (parentField).
idFieldstringid
labelFieldstringname
iconFieldstringiconRow field holding an icon-library name.
childrenFieldstringchildrenNested mode: the child array field.
parentFieldstring""Set for FLAT data: the field pointing at the parent id. Empty = nested.
selectionModeenumsingleOptions: none · single · multiple.
showSearchbooleanfalse
showTreeLinesbooleantrueDraw the connector lines between parents and children.
defaultExpandedenumrootsOptions: none · roots · all.
indentnumber20Width (px) of each depth column.
rowHeightnumber28
borderlessbooleanfalse
truncatebooleantrueTruncate long labels with an ellipsis. Off = let the label overflow — then 'overflow' decides scroll vs clip.
overflowbooleantrueWhen 'truncate' is OFF: allow horizontal overflow — long labels scroll sideways instead of being clipped.
selectedItemobject{}Output (single): the selected node as { id, label, path, node }. Bind e.g. {{ <name>.selectedItem.label }}.
selectedItemsarray[]Output (multiple): the selected nodes as an array of { id, label, path, node }.
expandedIdsarray[]Output (bind from this): currently-expanded node ids.
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
nodeSelectNode selectTreeThe selected node.
nodeDoubleClickNode double clickTreeThe node.
nodeExpandNode expandTreeThe expanded node.
nodeCollapseNode collapseTreeThe collapsed node.
selectionChangeSelection changeTreeThe current selection.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

To browse the tag namespace specifically, use Tag Browser instead.