Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adjust the height of preloads based on the relative change in row cou…

…nt so as to preserve adjusted heights
  • Loading branch information...
commit 8be923fd9021ba8b8ac9cacb047a9e1fada17187 1 parent 82d9e26
@kriszyp authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 OnDemandList.js
View
7 OnDemandList.js
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.