Moved function to treeview.js

This commit is contained in:
Bram 2024-12-01 21:27:12 +01:00
commit 491b319078
6 changed files with 56 additions and 52 deletions

View file

@ -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)}