mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(treeview)!: rename children
prop to nodes
for Svelte 5 compatibility
This commit is contained in:
parent
d655296fcf
commit
82905ac696
6 changed files with 56 additions and 56 deletions
|
@ -8,16 +8,16 @@
|
|||
let activeId: TreeNodeId = "";
|
||||
let selectedIds: TreeNodeId[] = [];
|
||||
let expandedIds: TreeNodeId[] = [1];
|
||||
let children: ComponentProps<TreeView>["children"] = [
|
||||
let nodes: ComponentProps<TreeView>["nodes"] = [
|
||||
{ id: 0, text: "AI / Machine learning", icon: Analytics },
|
||||
{
|
||||
id: 1,
|
||||
text: 0,
|
||||
children: [
|
||||
nodes: [
|
||||
{
|
||||
id: 2,
|
||||
text: "IBM Analytics Engine",
|
||||
children: [
|
||||
nodes: [
|
||||
{ id: 3, text: "Apache Spark" },
|
||||
{ id: 4, text: "Hadoop" },
|
||||
],
|
||||
|
@ -29,12 +29,12 @@
|
|||
{
|
||||
id: 7,
|
||||
text: "Blockchain",
|
||||
children: [{ id: 8, text: "IBM Blockchain Platform" }],
|
||||
nodes: [{ id: 8, text: "IBM Blockchain Platform" }],
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
text: "Databases",
|
||||
children: [
|
||||
nodes: [
|
||||
{ id: 10, text: "IBM Cloud Databases for Elasticsearch" },
|
||||
{ id: 11, text: "IBM Cloud Databases for Enterprise DB" },
|
||||
{ id: 12, text: "IBM Cloud Databases for MongoDB" },
|
||||
|
@ -45,7 +45,7 @@
|
|||
id: 14,
|
||||
text: "Integration",
|
||||
disabled: true,
|
||||
children: [{ id: 15, text: "IBM API Connect", disabled: true }],
|
||||
nodes: [{ id: 15, text: "IBM API Connect", disabled: true }],
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
bind:this="{treeview}"
|
||||
size="compact"
|
||||
labelText="Cloud Products"
|
||||
children="{children}"
|
||||
{nodes}
|
||||
bind:activeId
|
||||
bind:selectedIds
|
||||
bind:expandedIds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue