From 9129ce6893c62975b9948d207f4d09987e1755ba Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 13 Jul 2017 13:46:25 +0300 Subject: [PATCH] Skip rendering when node is offscreen --- treegrid.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/treegrid.js b/treegrid.js index 87e611d..b5a2399 100644 --- a/treegrid.js +++ b/treegrid.js @@ -6,7 +6,7 @@ * - dynamic loading of child nodes * * License: MPL 2.0+, (c) Vitaliy Filippov 2016+ - * Version: 2017-07-12 + * Version: 2017-07-13 */ /** @@ -1252,6 +1252,11 @@ TreeGridNode.prototype._renderCell = function(rowIndex, colIndex, cell, force) TreeGridNode.prototype.render = function(colidx, rowidx, force, skipSync) { + if (!this.tr) + { + // Node is not visible, skip rendering + return false; + } var cells = this.grid.renderer(this, colidx, rowidx); if (this.tr.length == 1) cells = [ cells ];