TreeSelect
A tree-based dropdown selector for hierarchical data.
When to Use
- For selecting from a tree structure (departments, categories)
- When options have parent-child relationships
- As an alternative to Cascader with a tree view
Import
Examples
Basic
Multiple with Checkboxes
Searchable
API
TreeSelectProps
treeData—TreeNode[]— Tree option datavalue—string | string[]— Selected value(s) (controlled)defaultValue—string | string[]— Default valueonChange—(value, label, extra) => void— Selection handlermultiple—boolean— Allow multiple selections (default:false)treeCheckable—boolean— Show checkboxes (default:false)showSearch—boolean— Enable search (default:false)treeDefaultExpandAll—boolean— Expand all nodes (default:false)loadData—(node) => Promise— Async data loadingfieldNames—{ label, value, children }— Custom field mappingplaceholder—string— Placeholder textdisabled—boolean— Disable the selectorsize—"small" | "middle" | "large"— Sizestatus—"error" | "warning"— Validation statusallowClear—boolean— Show clear button (default:true)