fix(tree-view)!: remove expanded property from TreeNode interface (#1631)

* fix(tree-view)!: remove `expanded` property from `TreeNode`

* fix(tree-view-node-list)!: remove unused `expanded` prop

* docs(tree-view): remove `expanded` as a property

#1630
This commit is contained in:
metonym 2023-01-17 17:55:46 -08:00 committed by GitHub
commit ec867c46ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 9 deletions

View file

@ -14522,9 +14522,9 @@
"ts": "type TreeNodeId = string | number"
},
{
"type": "{ id: TreeNodeId; text: any; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; expanded?: boolean; children?: TreeNode[]; }",
"type": "{ id: TreeNodeId; text: any; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; children?: TreeNode[]; }",
"name": "TreeNode",
"ts": "interface TreeNode { id: TreeNodeId; text: any; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; expanded?: boolean; children?: TreeNode[]; }"
"ts": "interface TreeNode { id: TreeNodeId; text: any; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; children?: TreeNode[]; }"
}
],
"rest_props": { "type": "Element", "name": "ul" }

View file

@ -7,7 +7,7 @@
The `children` prop accepts an array of child nodes. Each node should contain `id` and `text` properties.
Optional properties include `disabled`, `expanded`, `icon`, and `children`.
Optional properties include `disabled`, `icon`, and `children`.
A parent node contains `children` while a leaf node does not.

View file

@ -14,13 +14,11 @@
id: 1,
text: "Analytics",
icon: Analytics,
expanded: true,
children: [
{
id: 2,
text: "IBM Analytics Engine",
icon: Analytics,
expanded: true,
children: [
{ id: 3, text: "Apache Spark", icon: Analytics },
{ id: 4, text: "Hadoop", icon: Analytics },