feat(tree-view): make node slottable (#1843)

Closes #1660
This commit is contained in:
metonym 2023-11-12 14:15:28 -08:00 committed by GitHub
commit 6a55fef62e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 150 additions and 18 deletions

View file

@ -68,7 +68,19 @@ export default class TreeView extends SvelteComponentTyped<
focus: CustomEvent<TreeNode & { expanded: boolean; leaf: boolean }>;
keydown: WindowEventMap["keydown"];
},
{ labelText: {} }
{
default: {
node: {
id: TreeNodeId;
text: string;
expanded: boolean;
leaf: boolean;
disabled: boolean;
selected: boolean;
};
};
labelText: {};
}
> {
/**
* Programmatically expand all nodes