fix list tree

This commit is contained in:
yuri
2018-05-07 12:05:30 +03:00
parent 6ac0c7b301
commit f54b2788de
+12
View File
@@ -236,6 +236,18 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
this.listenToOnce(view, 'after:save', function (model) {
view.close();
model.set('childCollection', this.collection.createSeed());
if (model.get('parentId') !== attributes.parentId) {
var v = this;
while (1) {
if (v.level) {
v = v.getParentView().getParentView();
} else {
break;
}
}
v.collection.fetch();
return;
}
this.collection.push(model);
this.buildRows(function () {
this.render();