Skip to content

Commit

Permalink
Adjust the height of preloads based on the relative change in row cou…
Browse files Browse the repository at this point in the history
…nt so as to preserve adjusted heights
  • Loading branch information
kriszyp committed Jul 17, 2012
1 parent 82d9e26 commit 8be923f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OnDemandList.js
Expand Up @@ -404,10 +404,15 @@ 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 oldCount = below.count;
below.count = total - below.node.rowIndex;
below.node.blocksMove = below.count != 0;
// readjust the height
adjustHeight(below);
if(grid.maxEmptySpace < Infinity){
adjustHeight(below);
}else{
below.node.style.height = (below.node.offsetHeight + (below.count - oldCount) * grid.rowHeight) + "px";
}
});
}
grid._throttledProcessScroll();
Expand Down

0 comments on commit 8be923f

Please sign in to comment.