feat(tree-view): add showNode accessor (#1844)

Closes #1377
This commit is contained in:
metonym 2023-11-12 14:25:15 -08:00 committed by GitHub
commit 1ad4e3d385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}