From 33448c6eec43387b5df8082965cf182fe447307a Mon Sep 17 00:00:00 2001 From: Manu MA Date: Fri, 26 Oct 2018 19:26:16 +0200 Subject: [PATCH] fix(infinite-scroll): disabled resets loading/busy state (#16107) fixes #15994 --- core/src/components/infinite-scroll/infinite-scroll.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/components/infinite-scroll/infinite-scroll.tsx b/core/src/components/infinite-scroll/infinite-scroll.tsx index 7f84c33f91..1846f89d46 100644 --- a/core/src/components/infinite-scroll/infinite-scroll.tsx +++ b/core/src/components/infinite-scroll/infinite-scroll.tsx @@ -55,6 +55,10 @@ export class InfiniteScroll implements ComponentInterface { @Watch('disabled') protected disabledChanged(val: boolean) { + if (this.disabled) { + this.isLoading = false; + this.isBusy = false; + } this.enableScrollEvents(!val); } @@ -197,7 +201,8 @@ export class InfiniteScroll implements ComponentInterface { !this.disabled && !this.isBusy && !!this.scrollEl && - !this.isLoading); + !this.isLoading + ); } private enableScrollEvents(shouldListen: boolean) {