{"_id":"5b65b08eb1906e000319f858","category":{"_id":"5b65b08eb1906e000319f854","version":"5b65b08eb1906e000319f872","project":"5707c6875309d117006948d4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-07-15T07:28:09.870Z","from_sync":false,"order":0,"slug":"getting-started","title":"Basic"},"project":"5707c6875309d117006948d4","user":"54d742a80771980d0052f4b5","parentDoc":null,"version":{"_id":"5b65b08eb1906e000319f872","project":"5707c6875309d117006948d4","__v":0,"forked_from":"5aff027686c0a90003b923b4","createdAt":"2018-03-23T13:06:33.352Z","releaseDate":"2018-03-23T13:06:33.352Z","categories":["5b65b08eb1906e000319f854","5b65b08eb1906e000319f855","5b65b08eb1906e000319f856"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"8.0.0","version":"8.0.0"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-12-14T06:31:52.325Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Inputs to Tree component:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"    <tree-root [nodes]=\\\"nodes\\\" [options]=\\\"options\\\"></tree-root>\\n\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"nodes\"\n}\n[/block]\nArray of root nodes of the tree.\nEach node may contain the following fields:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"0-1\": \"Unique ID for the node.\\nIf one is not supplied it will be created by the tree library.\",\n    \"1-0\": \"name\",\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"2-0\": \"children\",\n    \"2-1\": \"An array of the node's children.\\nEach child is an object with the same structure as the parent node.\",\n    \"1-1\": \"Will be displayed by default in the tree.\",\n    \"3-0\": \"hasChildren\",\n    \"3-1\": \"For async data load. Denotes that this node might have children, even when 'children' attr is empty.\",\n    \"4-0\": \"isExpanded\",\n    \"4-1\": \"Determines whether the node starts as expanded by default. Notice that this field is not bindable, meaning that changing it doesn't affect the tree and vice versa.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n  {\\n    id: 1,\\n    name: 'root1',\\n    children: [\\n      {\\n        id: 2,\\n        name: 'child1'\\n      }, {\\n        id: 3,\\n        name: 'child2'\\n      }\\n    ]\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"focused\"\n}\n[/block]\nWhether the tree should be focused. Key navigation only works when the tree is focused.\nDefault value: false.","excerpt":"","slug":"options-1","type":"basic","title":"Nodes"}
Inputs to Tree component: [block:code] { "codes": [ { "code": " <tree-root [nodes]=\"nodes\" [options]=\"options\"></tree-root>\n", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "nodes" } [/block] Array of root nodes of the tree. Each node may contain the following fields: [block:parameters] { "data": { "0-0": "id", "0-1": "Unique ID for the node.\nIf one is not supplied it will be created by the tree library.", "1-0": "name", "h-0": "Property", "h-1": "Description", "2-0": "children", "2-1": "An array of the node's children.\nEach child is an object with the same structure as the parent node.", "1-1": "Will be displayed by default in the tree.", "3-0": "hasChildren", "3-1": "For async data load. Denotes that this node might have children, even when 'children' attr is empty.", "4-0": "isExpanded", "4-1": "Determines whether the node starts as expanded by default. Notice that this field is not bindable, meaning that changing it doesn't affect the tree and vice versa." }, "cols": 2, "rows": 5 } [/block] Example: [block:code] { "codes": [ { "code": "[\n {\n id: 1,\n name: 'root1',\n children: [\n {\n id: 2,\n name: 'child1'\n }, {\n id: 3,\n name: 'child2'\n }\n ]\n }\n]", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "focused" } [/block] Whether the tree should be focused. Key navigation only works when the tree is focused. Default value: false.