Skip to content

v0.82.0

Compare
Choose a tag to compare
@metonym metonym released this 13 Nov 16:10
· 212 commits to master since this release

What's Changed

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);