From 8b70cb8b03259a66aae85e2920d83b72bdb436ca Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 6 Jun 2016 14:02:11 +0300 Subject: [PATCH] Use TreeGrid renderer and keys --- treegrid.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/treegrid.js b/treegrid.js index f7ba1c2..3b8a1d5 100644 --- a/treegrid.js +++ b/treegrid.js @@ -1,7 +1,7 @@ /** * Very simple and fast tree grid/table, compatible with dynamic loading and jQuery fixedHeaderTable * License: MPL 2.0+, (c) Vitaliy Filippov 2016+ - * Version: 2016-06-05 + * Version: 2016-06-06 */ /** @@ -114,8 +114,7 @@ TreeGrid.prototype._setProps = function(el, props) el.innerHTML = props; else for (var j in this.bindProps) - if (props[j]) - el[j] = props[j]; + el[j] = props[j] || ''; } // Simple cell editing @@ -385,6 +384,11 @@ function TreeGridNode(node, grid, level, insertBefore, startHidden) } } +TreeGridNode.prototype.getKey = function() +{ + return this.key; +} + TreeGridNode.prototype.getChildByKey = function(key) { return this.childrenByKey[key];