Permalink
Browse files

Make the adjustments from the total updates be incremental changes to…

… the preload node
  • Loading branch information...
1 parent 37de2c5 commit b31416064dda673cf8d103b8a44ae346392442d8 @kriszyp committed Oct 15, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 OnDemandList.js
View
@@ -416,9 +416,13 @@ return declare([List, _StoreMixin], {
// (not uncommon when total counts are estimated for db perf reasons)
Deferred.when(results.total || results.length, function(total){
// recalculate the count
+ var priorCount = below.count;
below.count = total - below.node.rowIndex;
- // readjust the height
- adjustHeight(below);
+ var newRows = priorCount - below.count;
+ if(newRows){
+ // the count has changed due to a revised total, readjust the height
+ preload.node.style.height = (preload.node.offsetHeight + (newRows * grid.rowHeight)) + "px";
+ }
});
}
});

0 comments on commit b314160

Please sign in to comment.