Skip to content

Commit

Permalink
Merge pull request #7 from storediq/bhartel-defect-9227
Browse files Browse the repository at this point in the history
Bhartel defect 9227
  • Loading branch information
barbarahartel authored and GitHub Enterprise committed Sep 14, 2018
2 parents 2ad8480 + 854d06a commit e392ade
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/mixins/asinfinitescrollable.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,7 @@ define([
};
if (!this._getTotalModelCount) {
this._getTotalModelCount = function() {
// Fix for defect 11956:
// Only 100 items are listed on the Create Filter panel and the status in the filter list is missing
// 'collectionMap.call(this, collection.currentPage())' must be called in order
// to retrieve the items which are shown in the UI (the function might elimiates some items)
var collectionMap = this.get('collectionMap'),
collection = this.get('collection'),
uiColl;

if (collectionMap && collection) {
uiColl = collectionMap.call(this, collection.currentPage());
}
if (uiColl) {
// console.log("asinfinitescrollable.js-_getTotalModelCount - uicoll returned: " + uiColl.length);
return uiColl.length;
}
// var retVal = this.get('collection.total') || this.get('data.length') || 0;
// console.log("asinfinitescrollable.js-_getTotalModelCount - retVal returned: " + retVal);
return this.get('collection.total') || this.get('data.length') || 0;
};
Expand All @@ -161,7 +147,8 @@ define([
// only 100 items where shown on the UI, the rest were ignored.
if (models.length == total) {
limit = total;
this.set('limit',limit);
// this.set('limit',limit);
// console.log("asinfinitescrollable.js-_getWindowedModels limit not set - total: " + total + " limit: " + limit + " offset: " + offset);
}
// the offset can't be greater than the total-1imit
offset = Math.min(offset, total-limit);
Expand All @@ -175,6 +162,7 @@ define([
if (!this._isAllDataLoaded) {
this._isAllDataLoaded = function() {
var models = this.get('models') || [];
// console.log("asinfinitescrollable.js-_isAllDataLoaded modelLength: " + models.length + " totalModelCount: " + this._getTotalModelCount());
return this._getTotalModelCount() === models.length;
};
}
Expand Down

0 comments on commit e392ade

Please sign in to comment.