Skip to content

Commit 40ff730

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 cc68206 commit 40ff730

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
@@ -1308,7 +1308,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
13081308
let scrollOffset = 0;
13091309
const vScroll = this.scrollComponent.nativeElement;
13101310
scrollOffset = vScroll && this.scrollComponent.size ?
1311-
this.scrollPosition - this.sizesCache[this.state.startIndex] : 0;
1311+
this._virtScrollTop - this.sizesCache[this.state.startIndex] : 0;
13121312
this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';
13131313
}
13141314
private _updateHScrollOffset() {

0 commit comments

Comments
 (0)