From eda5e3e08a5a8a5dcfe9fb21032a3568ca5e1084 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 7 Feb 2019 13:25:58 +0100 Subject: [PATCH] MOBILE-2841 infinite: Don't send event if position is top --- src/components/infinite-loading/infinite-loading.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/infinite-loading/infinite-loading.ts b/src/components/infinite-loading/infinite-loading.ts index a3f1f89df..101e303d4 100644 --- a/src/components/infinite-loading/infinite-loading.ts +++ b/src/components/infinite-loading/infinite-loading.ts @@ -45,13 +45,13 @@ export class CoreInfiniteLoadingComponent implements OnChanges { * @param {SimpleChange}} changes Changes. */ ngOnChanges(changes: {[name: string]: SimpleChange}): void { - if (changes.enabled && this.enabled) { + if (changes.enabled && this.enabled && this.position == 'bottom') { // Infinite scroll enabled. If the list doesn't fill the full height, infinite scroll isn't triggered automatically. // Send a fake scroll event to make infinite scroll check if it should load more items. setTimeout(() => { const event: any = new Event('scroll'); this.content.ionScroll.emit(event); - }); + }, 400); } }