Tree
Overview
Shows records as an expandable hierarchy using a relation field that points to a parent record of the same entity: categories, departments, locations, folders.
Nested records using a parent relation field.
When to use
- Product categories and sub-categories
- Company departments and teams
- Sites → buildings → rooms for facilities management
- Task breakdown with sub-tasks
When not to use
- Flat lists: use Table or List
- Relations between two different entities: show them with Cards or a filtered Table on the parent's page
Quick start
- Add a Relation field on the entity pointing to the same entity (e.g. Parent category)
- Add a Tree and choose the entity in Properties → Data
- Set Parent field to that relation and Title field to the name
- Add On Row Click → Navigate to the record's page
Properties
Heading shown above the tree. Leave empty for none. Bindable, so it can include dynamic text such as the customer's name.
Example: Open jobs
Message shown when the query returns no records (after filters, search and permissions). Tell people what to do next: “No jobs yet — add one with the button above”.
Default: Nothing here yet.
Relation field pointing to the parent record. Records with no parent (or a parent outside the loaded set) become top-level items. Defaults to the first self-referencing relation.
The field shown as the main text of each item. Defaults to the entity's display field (usually Name or Title).
Example: name
Data binding
An entity query; up to 1000 records load so the whole hierarchy can be built client-side. The first level is expanded by default; Expand all / Collapse all buttons appear when there are children. Exposes selectedId.
Properties that can use dynamic data: Title, data.
Events
- On row click
- Runs when a record is clicked or activated with Enter. Event → record holds the whole record and Event → id its id; actions can also read Current record. Typical: Navigate to a details page with id = Event → id, or Open Drawer with the record.
Actions
Open the Actions tab in the inspector, pick an event and add actions such as Go to page, Create record or Show message. Actions run in order; data-changing actions run on the server with the signed-in user's permissions.
Responsive behavior
Nesting is indented; deep trees can be narrow on phones, so keep hierarchies to 3–4 levels.
Permissions
Records are filtered on the server by the current role's rules (for example customers only receive their own records) and hidden fields are removed before anything reaches the browser. Hiding this component does not protect the data; set permissions on the entity.
Accessibility
- A real tree widget: arrow keys expand/collapse, Enter opens the item
Examples
Product categories
Entity: Categories · Field: parent (Relation → Categories) Source: Categories · Sort: name Parent field: parent · Title field: name On Row Click: Navigate → Products, categoryId = Event → id
Common patterns
- Dropdown on the category form loading options from the same entity to pick the parent
Limitations
- One parent per record (the first value of a multiple relation is used)
- No drag-and-drop to re-parent
- Cycles are tolerated but broken at the first repeat
Troubleshooting
Why: Parent field empty or pointing to another entity
Fix: Choose a relation field whose target is this same entity
Why: Its parent record is filtered out or not readable
Fix: Loosen the query filters or permissions