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;
|
||||
if (distanceFromInfinite < 0) {
|
||||
this._zone.run(() => {
|
||||
this.state = STATE_LOADING;
|
||||
this.ionInfinite.emit(this);
|
||||
if (this.state !== STATE_LOADING && this.state !== STATE_DISABLED) {
|
||||
this.state = STATE_LOADING;
|
||||
this.ionInfinite.emit(this);
|
||||
}
|
||||
});
|
||||
return 5;
|
||||
}
|
||||
|
Reference in New Issue
Block a user