mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
fix(infinite-scroll): disabled resets loading/busy state (#16107)
fixes #15994
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user