mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
Moved function to treeview.js
This commit is contained in:
parent
15a9cfb8d2
commit
a29196c4a2
6 changed files with 56 additions and 52 deletions
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { TreeView } from "carbon-components-svelte";
|
||||
import { TreeView, toHierarchy } from "carbon-components-svelte";
|
||||
import WatsonMachineLearning from "carbon-icons-svelte/lib/WatsonMachineLearning.svelte";
|
||||
import Analytics from "carbon-icons-svelte/lib/Analytics.svelte";
|
||||
import Blockchain from "carbon-icons-svelte/lib/Blockchain.svelte";
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
<TreeView
|
||||
labelText="Cloud Products"
|
||||
{nodesFlat}
|
||||
nodes={toHierarchy(nodesFlat)}
|
||||
bind:activeId
|
||||
bind:selectedIds
|
||||
on:select={({ detail }) => console.log("select", detail)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue