Skip to content

TreeSelect

Tree-structure selection supporting parent-child cascaded multiple selection.

Single Select

Single select

Click a node to select it and close the dropdown; children can be expanded/collapsed.

Multiple Select (parent-child linkage)

Multiple

In multiple mode, selecting a parent cascades the selection to all children; clicking again cancels. Parent nodes show an "all / half" selected state.

Preset Value

Preset value

Controlled Expand (expanded)

expanded is a JSON array declaring the set of node values to expand (a controlled channel): externally changing the property immediately reflects in the dropdown tree. Below, "Frontend → Framework" is pre-expanded, and buttons drive it externally:

Controlled expand (expanded)

Expand allCollapse all

Presetting expanded='["fe","framework"]' expands "Frontend" and "Framework" the first time the dropdown opens; clicking "Expand all" externally writes expanded='["fe","framework","be"]', and "Collapse all" writes '[]', re-rendering immediately when the dropdown opens.

Disabled

Disabled

Empty State

No data

Events

Change events

Listen to oas-change; detail.value is a string for single select and an array for multiple:

API

Attributes

AttributeDescriptionTypeDefault
disabledDisabledboolean
expandedSet of expanded node values (JSON array, controlled)string[]
multipleMultiple select + parent-child cascadeboolean
optionsTree options, JSON array, supports children / disabledTreeOption[] | string[]
placeholderPlaceholder text
valueSelected value (JSON array in multiple mode)string[]

Events

EventDescription
oas-changeSelection change, detail: { value }