{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Nodes","type":"basic","slug":"options-1","excerpt":"","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.","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5c27be9e2b75bd0045dc745c","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Basic","slug":"getting-started","order":0,"from_sync":false,"reference":false,"_id":"5c27be9e2b75bd0045dc7458","version":"5c27be9e2b75bd0045dc7476","project":"5707c6875309d117006948d4","createdAt":"2017-07-15T07:28:09.870Z","__v":0},"project":"5707c6875309d117006948d4","user":"54d742a80771980d0052f4b5","parentDoc":null,"version":{"version":"8.2.0","version_clean":"8.2.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5c27be9e2b75bd0045dc7458","5c27be9e2b75bd0045dc7459","5c27be9e2b75bd0045dc745a"],"_id":"5c27be9e2b75bd0045dc7476","project":"5707c6875309d117006948d4","__v":0,"forked_from":"5b65b08eb1906e000319f872","createdAt":"2018-03-23T13:06:33.352Z","releaseDate":"2018-03-23T13:06:33.352Z"},"createdAt":"2017-12-14T06:31:52.325Z","githubsync":"","__v":0}
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.