fix stream list

This commit is contained in:
yuri
2018-09-04 16:56:09 +03:00
parent 5d3b515ef1
commit 1ddea9938b
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -812,13 +812,15 @@ var Bull = Bull || {};
options.el = this.getSelector() + ' [data-view="'+key+'"]';
}
this._factory.create(viewName, options, function (view) {
var isSet = false;
if (this._isRendered || options.setViewBeforeCallback) {
this.setView(key, view);
isSet = true;
}
if (typeof callback === 'function') {
callback.call(context, view);
}
if (!this._isRendered && !options.setViewBeforeCallback) {
if (!this._isRendered && !options.setViewBeforeCallback && !isSet) {
this.setView(key, view);
}
}.bind(this));
+4 -2
View File
@@ -54,9 +54,9 @@ Espo.define('views/stream/record/list', 'views/record/list-expanded', function (
noEdit: this.options.noEdit,
optionsToPass: ['acl'],
name: this.type + '-' + model.name,
el: this.options.el + ' li[data-id="' + model.id + '"]'
el: this.options.el + ' li[data-id="' + model.id + '"]',
setViewBeforeCallback: this.options.skipBuildRows && !this.isRendered()
}, callback);
},
buildRows: function (callback) {
@@ -77,12 +77,14 @@ Espo.define('views/stream/record/list', 'views/record/list-expanded', function (
callback();
}
this.wait(false);
this.trigger('after:build-rows');
}
}.bind(this));
}
} else {
if (typeof callback == 'function') {
callback();
this.trigger('after:build-rows');
}
}
},