Skip to content

Commit

Permalink
fix(infinite-scroll): disabld resets loading/busy state
Browse files Browse the repository at this point in the history
fixes #15994
  • Loading branch information
manucorporat committed Oct 26, 2018
1 parent aad7711 commit 9687a66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/components/infinite-scroll/infinite-scroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -197,7 +201,8 @@ export class InfiniteScroll implements ComponentInterface {
!this.disabled &&
!this.isBusy &&
!!this.scrollEl &&
!this.isLoading);
!this.isLoading
);
}

private enableScrollEvents(shouldListen: boolean) {
Expand Down

0 comments on commit 9687a66

Please sign in to comment.