{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Custom Fields","type":"basic","slug":"custom-fields-1","excerpt":"","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]","updates":[],"order":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5c27be9e2b75bd0045dc746e","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Guides","slug":"documentation","order":1,"from_sync":false,"reference":false,"_id":"5c27be9e2b75bd0045dc7459","version":"5c27be9e2b75bd0045dc7476","project":"5707c6875309d117006948d4","createdAt":"2016-04-08T14:56:07.661Z","__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-14T13:34:39.260Z","githubsync":"","__v":0}
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]