Universal Component

Tree

Tree component with filtering, single/multi select, and expand controls.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

Tree

Tree component with filtering, single/multi select, and expand controls.

Basic Usage

Demo loads on client.

API

TxTree Props

NameTypeDefaultDescription
nodesTreeNode[][]Data source
modelValuestring | number | Array<string | number>-Selected value
multiplebooleanfalseEnable multi-select
selectablebooleantrueSelectable nodes
checkablebooleanfalseShow checkboxes
disabledbooleanfalseDisabled state
defaultExpandedKeysArray<string | number>[]Default expanded keys
expandedKeysArray<string | number>-Controlled expanded keys
indentnumber16Indent width
filterTextstring''Filter text
filterMethod(node, query) => boolean-Custom filter function

TreeNode

FieldTypeDescription
keystring | numberUnique key
labelstringDisplay label
disabledbooleanDisabled state
childrenTreeNode[]Child nodes
iconTxIconSource | stringNode icon

Events

EventPayloadDescription
update:modelValue(value)Selection update
select({ key, node })Node selected
toggle({ key, expanded })Expand/collapse
update:expandedKeys(keys)Expanded keys update

Slots

NameDescription
itemCustom item renderer
emptyEmpty state
Was this helpful?