mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
Fix that toHierarchy couldn't be found. Updated docs and test.
This commit is contained in:
parent
a29196c4a2
commit
21d599c8b6
11 changed files with 70 additions and 47 deletions
11
types/TreeView/TreeView.svelte.d.ts
vendored
11
types/TreeView/TreeView.svelte.d.ts
vendored
|
@ -20,12 +20,6 @@ type $Props = {
|
|||
*/
|
||||
nodes?: Array<TreeNode>;
|
||||
|
||||
/**
|
||||
* Provide a flat array of nodes to render
|
||||
* @default []
|
||||
*/
|
||||
nodesFlat?: Array<TreeNode & { pid?: any }>;
|
||||
|
||||
/**
|
||||
* Set the current active node id
|
||||
* Only one node can be active
|
||||
|
@ -100,6 +94,11 @@ export default class TreeView extends SvelteComponentTyped<
|
|||
*/
|
||||
collapseAll: () => void;
|
||||
|
||||
/**
|
||||
* Create a nested array from a flat array
|
||||
*/
|
||||
toHierarchy: (flatArray: TreeNode[] & { pid?: any }[]) => TreeNode[];
|
||||
|
||||
/**
|
||||
* Programmatically expand a subset of nodes.
|
||||
* Expands all nodes if no argument is provided
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue