Skip to content

Commit 819a3d0

Browse files
MKirovaMayaKirova
authored andcommitted
fix(virtualization): Use virtual scroll top which takes virtual height to actual height ration when recalculating vertical offset.
1 parent ff3bb4c commit 819a3d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
12911291
let scrollOffset = 0;
12921292
const vScroll = this.scrollComponent.nativeElement;
12931293
scrollOffset = vScroll && this.scrollComponent.size ?
1294-
this.scrollPosition - this.sizesCache[this.state.startIndex] : 0;
1294+
this._virtScrollTop - this.sizesCache[this.state.startIndex] : 0;
12951295
this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';
12961296
}
12971297
private _updateHScrollOffset() {

0 commit comments

Comments
 (0)