From c8e87edc20ccf814c4f953892e518f6cce6c0457 Mon Sep 17 00:00:00 2001 From: MartinKamenov Date: Mon, 7 Jan 2019 15:51:07 +0200 Subject: [PATCH] chore(*): Added Math ceil in order to get the correct endIndex. --- .../src/lib/directives/for-of/for_of.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts index 08d2ff8db3e..4bb9d630fe1 100644 --- a/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts @@ -458,9 +458,9 @@ export class IgxForOfDirective implements OnInit, OnChanges, DoCheck, OnDestr * ``` */ public scrollNext() { - const scr = this.igxForScrollOrientation === 'horizontal' ? + const scr = Math.ceil(this.igxForScrollOrientation === 'horizontal' ? this.hScroll.scrollLeft : - this.vh.instance.elementRef.nativeElement.scrollTop; + this.vh.instance.elementRef.nativeElement.scrollTop); const endIndex = this.getIndexAt( scr + parseInt(this.igxForContainerSize, 10), this.sizesCache,