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
491b319078
commit
048c10a6ab
11 changed files with 70 additions and 47 deletions
9
types/TreeView/treeview.d.ts
vendored
Normal file
9
types/TreeView/treeview.d.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { type TreeNode } from "carbon-components-svelte/TreeView/TreeView.svelte";
|
||||
/**
|
||||
* Create a nested array from a flat array
|
||||
*/
|
||||
export function toHierarchy(
|
||||
flatArray: TreeNode[] & { pid?: any }[],
|
||||
): TreeNode[];
|
||||
|
||||
export default toHierarchy;
|
Loading…
Add table
Add a link
Reference in a new issue