Skip to content

Commit 54aa9a2

Browse files
authored
Merge pull request #826 from firehorseuk/fix/data-loader-boundary-starvation
Fix backward data loading when forward loading is exhausted
2 parents 612c2cb + 701a374 commit 54aa9a2

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/Store.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,10 @@ export default class StoreImp implements Store {
751751
}
752752
}
753753
// More processing and loading, more loading if there are callback methods and no data is being loaded
754-
if (from === 0) {
755-
if (this._dataLoadMore.forward) {
756-
this._processDataLoad('forward')
757-
}
758-
} else if (to === totalBarCount) {
759-
if (this._dataLoadMore.backward) {
760-
this._processDataLoad('backward')
761-
}
754+
if (from === 0 && this._dataLoadMore.forward) {
755+
this._processDataLoad('forward')
756+
} else if (to === totalBarCount && this._dataLoadMore.backward) {
757+
this._processDataLoad('backward')
762758
}
763759
}
764760

0 commit comments

Comments
 (0)