Tree
Data Displayatlas-treeExamples
File tree
Nodes are data with optional children. Arrow keys move and expand; [(expandedKeys)] holds the open nodes.
- src
- package.json
Checkable
With checkable and selectionMode="multiple" , checking a parent checks its children.
- Orders
- Reports
Checked: orders.read
Single selection
selectionMode="single" makes one node the selection ( [(value)] ), for a folder picker. [(expandedKeys)] keeps the open folders in your state.
- Projects
- Archive (read-only)
Move to: atlas
API
Generated from the library source, so it always matches the code.
AtlasTreeComponent atlas-tree
| Input | Type | Default | Description |
|---|---|---|---|
| nodes required | TreeNode[] | — | children , an icon , and be disabled . |
| selectionMode | 'none' | 'single' | 'multiple' | 'none' | |
| checkable | boolean | false | selectionMode is single . |
| value two-way | string[] | [] | |
| expandedKeys two-way | string[] | [] | |
| expandAll | boolean | false | |
| indentPx | number | 24 | |
| aria-label | string | undefined | undefined | |
| class | string | '' | cn() ; yours win on conflicts. |
| Output | Payload | Description |
|---|---|---|
| nodeClick | TreeNode | |
| nodeExpand | TreeNodeEvent | |
| selectionChange | TreeSelectionEvent |
Types
TreeNode
| Property | Type | Description |
|---|---|---|
| id | string | |
| label | string | |
| icon? | string | |
| children? | TreeNode[] | |
| disabled? | boolean | |
| data? | unknown |
TreeNodeEvent
| Property | Type | Description |
|---|---|---|
| node | TreeNode | |
| expanded | boolean |
TreeSelectionEvent
| Property | Type | Description |
|---|---|---|
| selected | string[] |