Skip to content

Commit 34df9f2

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Fix test.
1 parent 9bf60fa commit 34df9f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,9 +1614,10 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16141614
const containerSize = 'igxForContainerSize';
16151615
if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {
16161616
this._recalcOnContainerChange();
1617-
if (changes[containerSize].previousValue) {
1618-
this.scrollComponent.scrollAmount = this.scrollComponent.nativeElement[this.igxForScrollOrientation === "horizontal" ? "scrollLeft" : "scrollTop"];
1619-
this._updateScrollOffset();
1617+
if (changes[containerSize].previousValue && this.igxForScrollOrientation === "horizontal") {
1618+
const scrollAmount = this.scrollComponent.nativeElement["scrollLeft"];
1619+
this.scrollComponent.scrollAmount = scrollAmount;
1620+
this.onHScroll(scrollAmount);
16201621
}
16211622
}
16221623
}

0 commit comments

Comments
 (0)