Avoid create a promise for each row of a tree
issue8536 review283821003
This commit is contained in:
1 parent
5234481cdc
commit
db1ff7f5ae
1 file changed
+7
-2
+7
-2
@@ -1061,7 +1061,7 @@
|
||||
var row_id_path = this.get_id_path();
|
||||
this.set_selection(Sao.common.contains(selected, row_id_path));
|
||||
if (this.children_field) {
|
||||
this.record.load(this.children_field).done(function() {
|
||||
var update_expander = function() {
|
||||
var children = this.record.field_get_client(
|
||||
this.children_field);
|
||||
if (this.is_expanded() ||
|
||||
@@ -1078,7 +1078,12 @@
|
||||
length ? 'visible' : 'hidden');
|
||||
this.update_expander(false);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this);
|
||||
if (!this.record.is_loaded(this.children_field)) {
|
||||
this.record.load(this.children_field).done(update_expander);
|
||||
} else {
|
||||
update_expander();
|
||||
}
|
||||
}
|
||||
if (this.record.deleted || this.record.removed) {
|
||||
this.el.css('text-decoration', 'line-through');
|
||||
|
||||
Reference in new issue
Block a user