From 81adc7d0db72a2f4ef162f966ea5c8608ff74cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Apr 2015 19:01:01 +0200 Subject: [PATCH] Compare also the record rows to reconstruct tree view As the row keeps a link to the record, the records of the group could have been replaced by new records with exactly the same length. --- src/view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/view.js b/src/view.js index 9f0752ef28..49d754832a 100644 --- a/src/view.js +++ b/src/view.js @@ -266,7 +266,10 @@ } expanded = expanded || []; - if (this.screen.group.length != this.rows.length) { + if ((this.screen.group.length != this.rows.length) || + !Sao.common.compare(this.screen.group, this.rows.map(function(row) { + return row.record; + }))) { this.construct(selected, expanded); }