Every line of 'kendo tree view' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
43 function TreeNode(tree, config) { 44 config || (config = {}); 45 46 this.id = this._yuid = config.id || this.id || Y.guid('treeNode-'); 47 this.tree = tree; 48 49 if ('label' in config) { 50 this.label = config.label; 51 } 52 53 this.children = config.children || []; 54 this.data = config.data || {}; 55 this.state = config.state || {}; 56 57 if (config.canHaveChildren) { 58 this.canHaveChildren = config.canHaveChildren; 59 } else if (this.children.length) { 60 this.canHaveChildren = true; 61 } 62 63 // Mix in arbitrary properties on the config object, but don't overwrite any 64 // existing properties of this node. 65 Y.mix(this, config); 66 67 // If this node has children, loop through them and ensure their parent 68 // references are all set to this node. 69 for (var i = 0, len = this.children.length; i < len; i++) { 70 this.children[i].parent = this; 71 } 72 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
48 function TreeView(grid, options) { 49 this.grid = grid; 50 this.options = options || {}; 51 grid.properties.showTreeColumn = false; 52 }