opinion
TreeSelect
A trigger that opens a popover tree; picking a node closes it.
Team pickerProjects grouped by team
Selected: none
In context
Move taskSend Icon audit to another project
Move Icon auditCurrently in Harbour rebrand
New project
Props
| Prop | Type | Required | Default |
|---|---|---|---|
data | TreeNode[] | Yes | — |
value | string | undefined | No | — |
defaultValue | string | undefined | No | — |
onValueChange | ((value: string, label: string) => void) | undefined | No | — |
placeholder | string | undefined | No | Select an item |
Built on TreeView
The popover is the real TreeView, so data has the same shape and keyboard behaviour. Picking a node closes it.
data-rebar-* attributes
data-rebar-component="tree-select" on the trigger; the popover holds a real TreeView with its own attributes.
Migrating to Ant Design
AntD's TreeSelect is a close equivalent: data (value, label, children) maps to treeData (value, title, children).