mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
fix(infiniteScroll): ensure infinite doesn't fire when already loading
This commit is contained in:
@ -178,8 +178,10 @@ export class InfiniteScroll {
|
|||||||
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
|
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
|
||||||
if (distanceFromInfinite < 0) {
|
if (distanceFromInfinite < 0) {
|
||||||
this._zone.run(() => {
|
this._zone.run(() => {
|
||||||
this.state = STATE_LOADING;
|
if (this.state !== STATE_LOADING && this.state !== STATE_DISABLED) {
|
||||||
this.ionInfinite.emit(this);
|
this.state = STATE_LOADING;
|
||||||
|
this.ionInfinite.emit(this);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user