{"_id":"5b65b08eb1906e000319f86a","category":{"_id":"5b65b08eb1906e000319f855","version":"5b65b08eb1906e000319f872","project":"5707c6875309d117006948d4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-08T14:56:07.661Z","from_sync":false,"order":1,"slug":"documentation","title":"Guides"},"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-14T13:34:39.260Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"Node field names are customizable using the following options:\n- childrenField\n- displayField\n- idField\n- isExpandedField\n- hasChildrenField\n[block:api-header]\n{\n  \"title\": \"Example\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"  nodes = [\\n    {\\n      _id: '1',\\n      title: 'root1',\\n      nodes: [{_id: '3', title: 'child1'}]\\n    },\\n    {\\n      _id: '2',\\n      title: 'root2'\\n    }\\n  ];\\n\\n  options: ITreeOptions = {\\n    idField: '_id',\\n    displayField: 'title',\\n    childrenField: 'nodes'\\n  };\\n\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"custom-fields-1","type":"basic","title":"Custom Fields"}
Node field names are customizable using the following options: - childrenField - displayField - idField - isExpandedField - hasChildrenField [block:api-header] { "title": "Example" } [/block] [block:code] { "codes": [ { "code": " nodes = [\n {\n _id: '1',\n title: 'root1',\n nodes: [{_id: '3', title: 'child1'}]\n },\n {\n _id: '2',\n title: 'root2'\n }\n ];\n\n options: ITreeOptions = {\n idField: '_id',\n displayField: 'title',\n childrenField: 'nodes'\n };\n", "language": "javascript" } ] } [/block]