v0.82.0
What's Changed
- feat(tree-view): make
node
slottable by @metonym in #1843 - feat(tree-view): add
showNode
accessor by @metonym in #1844
Full Changelog: v0.81.3...v0.82.0
This release focuses on TreeView
improvements.
TreeView
node
is slottable
Previously, the TreeView
used the node.text
value. Now, you can destructure let:node
and override the default slot to customize the rendered content and styles on a per-node basis.
See an example.
<TreeView children="{children}" let:node>
{node.id}
{node.text}
{node.expanded}
{node.selected}
{node.disabled}
{node.leaf} <!-- True if the node is a leaf (node does not have children) -->
</TreeView>
Programmatically "show" a TreeView
node
The TreeView
component now supports a showNode
accessor to show a specific node.
Given the node.id
, the matching node will be expanded, selected, and focused.
See an example.
treeview?.showNode(node.id);