feat(tree-view): add showNode accessor

Closes #1377
This commit is contained in:
Eric Liu 2023-11-12 10:59:27 -08:00
commit eedac49ab3
7 changed files with 150 additions and 15 deletions

View file

@ -103,4 +103,10 @@ export default class TreeView extends SvelteComponentTyped<
* Collapses all nodes if no argument is provided
*/
collapseNodes: (filterId?: (node: TreeNode) => boolean) => void;
/**
* Programmatically show a node by `id`.
* The matching node will be expanded, selected, and focused
*/
showNode: (id: TreeNodeId) => void;
}