fix(infinite-scroll): disabled

This commit is contained in:
Manu Mtz.-Almeida
2018-01-25 16:49:20 +01:00
parent 15e067a72f
commit 3e57f23ea0
2 changed files with 4 additions and 5 deletions

View File

@ -1331,7 +1331,6 @@ declare global {
color?: string;
href?: string;
mode?: 'ios' | 'md';
onclick?: (this: HTMLElement, ev: MouseEvent) => any;
}
}
}

View File

@ -65,7 +65,7 @@ export class InfiniteScroll {
@Watch('disabled')
protected disabledChanged(val: boolean) {
this.enableScrollEvents(val);
this.enableScrollEvents(!val);
}
/**
@ -97,14 +97,14 @@ export class InfiniteScroll {
}
this.init = true;
this.thresholdChanged(this.threshold);
this.enableScrollEvents(this.disabled);
this.enableScrollEvents(!this.disabled);
if (this.position === Position.Top) {
this.dom.write(() => this.scrollEl.scrollToBottom(0));
}
}
componentDidUnload() {
this.enableScrollEvents(false);
this.enableScrollEvents(!this.disabled);
this.scrollEl = null;
}
@ -145,7 +145,7 @@ export class InfiniteScroll {
private canStart(): boolean {
return (
this.disabled &&
!this.disabled &&
!this.isBusy &&
this.scrollEl &&
!this.isLoading);