BalanceReckon Design System
OthersTreeView

TreeView

A tree view presents a hierarchical list.

TreeViewProps

PropTypeRequiredDefaultDescription
dataNode[]Yes—The leaf and branch nodes
defaultExpandedIdsDefaultExpandedIds——Receives a list of ids and expand the tree
isSelected(node: Node) => boolean——Predicate to determine the selected node
labelstringYes—Describe the tree content
nodeRenderer(node: Node) => ReactElementYes—Render prop for each node
onSelect(node: Node) => void——Callback that is called when a node is selected