Skip to content

Commit

Permalink
Merge pull request #848 from dpangier/master
Browse files Browse the repository at this point in the history
Second attempt to fix #777, still ensuring the rendering row count is sensible
  • Loading branch information
roblarsen committed Dec 3, 2013
2 parents f68765f + f6a683e commit 769f15d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/classes/grid.js
Expand Up @@ -805,8 +805,8 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter,
}
newRange = new ngRange(Math.max(0, rowIndex - EXCESS_ROWS), rowIndex + self.minRowsToRender() + EXCESS_ROWS);
} else {
var maxLen = $scope.configGroups.length > 0 ? self.rowFactory.parsedData.length : self.data.length;
newRange = new ngRange(0, Math.min(maxLen, self.minRowsToRender() + EXCESS_ROWS));
var maxLen = $scope.configGroups.length > 0 ? self.rowFactory.parsedData.length : self.filteredRows.length;
newRange = new ngRange(0, Math.max(maxLen, self.minRowsToRender() + EXCESS_ROWS));
}
self.prevScrollTop = scrollTop;
self.rowFactory.UpdateViewableRange(newRange);
Expand Down

0 comments on commit 769f15d

Please sign in to comment.