fix(infinite-scroll): disabled resets loading/busy state (#16107)

fixes #15994
This commit is contained in:
Manu MA
2018-10-26 19:26:16 +02:00
committed by GitHub
parent aad7711af2
commit 33448c6eec

View File

@ -55,6 +55,10 @@ export class InfiniteScroll implements ComponentInterface {
@Watch('disabled') @Watch('disabled')
protected disabledChanged(val: boolean) { protected disabledChanged(val: boolean) {
if (this.disabled) {
this.isLoading = false;
this.isBusy = false;
}
this.enableScrollEvents(!val); this.enableScrollEvents(!val);
} }
@ -197,7 +201,8 @@ export class InfiniteScroll implements ComponentInterface {
!this.disabled && !this.disabled &&
!this.isBusy && !this.isBusy &&
!!this.scrollEl && !!this.scrollEl &&
!this.isLoading); !this.isLoading
);
} }
private enableScrollEvents(shouldListen: boolean) { private enableScrollEvents(shouldListen: boolean) {