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')
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) {