mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(tree-view): make TreeView
children prop type work recursively (#1566)
This commit is contained in:
parent
ae34451583
commit
21d841feeb
4 changed files with 9 additions and 7 deletions
3
types/TreeView/TreeView.svelte.d.ts
vendored
3
types/TreeView/TreeView.svelte.d.ts
vendored
|
@ -9,6 +9,7 @@ export interface TreeNode {
|
|||
icon?: typeof import("svelte").SvelteComponent;
|
||||
disabled?: boolean;
|
||||
expanded?: boolean;
|
||||
children?: TreeNode[];
|
||||
}
|
||||
|
||||
export interface TreeViewProps
|
||||
|
@ -17,7 +18,7 @@ export interface TreeViewProps
|
|||
* Provide an array of children nodes to render
|
||||
* @default []
|
||||
*/
|
||||
children?: Array<TreeNode & { children?: TreeNode[] }>;
|
||||
children?: Array<TreeNode>;
|
||||
|
||||
/**
|
||||
* Set the current active node id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue