From 73481748c1ef52c0ee2829b2ab7a301c849f1554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 25 Aug 2016 19:11:24 +0200 Subject: [PATCH] Reuse existing cell when redrawing row It is better to avoid remove/append on the DOM to prevent to trigger a repaint. So we should reuse existing cell if possible instead of replacing it on each redraw. issue5803 review21211002 --- src/common.js | 25 ++++++++++++-------- src/view/tree.js | 60 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 26 deletions(-) diff --git a/src/common.js b/src/common.js index 37d4d4d74e..3165866c7e 100644 --- a/src/common.js +++ b/src/common.js @@ -714,17 +714,22 @@ }; Sao.common.Button = Sao.class_(Object, { - init: function(attributes) { + init: function(attributes, el) { this.attributes = attributes; - this.el = jQuery('