Skip to content

Commit 9a7101c

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Fix test.
1 parent e27829e commit 9a7101c

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
@@ -1627,9 +1627,10 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
16271627
const prevSize = parseInt(changes[containerSize].previousValue, 10);
16281628
const newSize = parseInt(changes[containerSize].currentValue, 10);
16291629
this._recalcOnContainerChange({prevSize, newSize});
1630-
if (changes[containerSize].previousValue) {
1631-
this.scrollComponent.scrollAmount = this.scrollComponent.nativeElement[this.igxForScrollOrientation === "horizontal" ? "scrollLeft" : "scrollTop"];
1632-
this._updateScrollOffset();
1630+
if (changes[containerSize].previousValue && this.igxForScrollOrientation === "horizontal") {
1631+
const scrollAmount = this.scrollComponent.nativeElement["scrollLeft"];
1632+
this.scrollComponent.scrollAmount = scrollAmount;
1633+
this.onHScroll(scrollAmount);
16331634
}
16341635
}
16351636
}

0 commit comments

Comments
 (0)