Skip to content

Commit a1e6a04

Browse files
committed
Merge pull request #4779 from imbalind/issue4776
fix(core): Fix #4776 scrollTo doesn't work with higher rowHeight
2 parents f715767 + 0d7d37b commit a1e6a04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/core/factories/Grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ angular.module('ui.grid')
23322332
//}
23332333

23342334
// This is the minimum amount of pixels we need to scroll vertical in order to see this row.
2335-
var pixelsToSeeRow = ((seekRowIndex + 1) * self.options.rowHeight);
2335+
var pixelsToSeeRow = (seekRowIndex * self.options.rowHeight + self.headerHeight);
23362336

23372337
// Don't let the pixels required to see the row be less than zero
23382338
pixelsToSeeRow = (pixelsToSeeRow < 0) ? 0 : pixelsToSeeRow;

0 commit comments

Comments
 (0)