Fix Bug 51297 (#1045)

Co-authored-by: Julia Radzhabova <julia.radzhabova@onlyoffice.com>
This commit is contained in:
Alexander Trofimov 2021-08-04 16:34:35 +03:00 committed by GitHub
parent a113f189f9
commit bbb0d0d6e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -476,7 +476,10 @@ define([
}, this);
this.dataViewItems = [];
this.store.each(this.onAddItem, this);
var me = this;
this.store.each(function(item){
me.onAddItem(item, me.store);
}, this);
if (this.allowScrollbar) {
this.scroller = new Common.UI.Scroller({

View file

@ -198,7 +198,7 @@ define([
if (innerEl) {
(this.dataViewItems.length<1) && innerEl.find('.empty-text').remove();
if (opts && opts.at!==undefined) {
if (opts && (typeof opts.at==='number')) {
var idx = opts.at;
var innerDivs = innerEl.find('> div');
if (idx > 0)