@infinite-list/data-model
Advanced tools
Comparing version 0.2.6 to 0.2.7
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
@@ -737,3 +737,3 @@ import createStore from '../state/createStore'; | ||
bufferedEndIndex: 15, | ||
isEndReached: true, | ||
isEndReached: false, | ||
distanceFromEnd: 2974, | ||
@@ -761,3 +761,3 @@ data: data.slice(0, 16), | ||
bufferedEndIndex: 15, | ||
isEndReached: true, | ||
isEndReached: false, | ||
distanceFromEnd: 3574, | ||
@@ -795,3 +795,3 @@ data: data.slice(0, 16), | ||
bufferedEndIndex: 15, | ||
isEndReached: true, | ||
isEndReached: false, | ||
distanceFromEnd: 2074, | ||
@@ -977,3 +977,3 @@ data: data.slice(0, 16), | ||
bufferedEndIndex: 15, | ||
isEndReached: true, | ||
isEndReached: false, | ||
distanceFromEnd: 2064, | ||
@@ -980,0 +980,0 @@ data: data.slice(0, 16), |
@@ -17,7 +17,9 @@ import ListDimensions from '../ListDimensions'; | ||
const _info = dimension.getOnEndReachedHelper().perform(scrollMetrics); | ||
const isEndReached = _info.isEndReached; | ||
let isEndReached = _info.isEndReached; | ||
// isEndReached should not be rewrite, or trigger onEndReached... | ||
let nextIsEndReached = isEndReached; | ||
const distanceFromEnd = _info.distanceFromEnd; | ||
if (!isEndReached) { | ||
if (!nextIsEndReached) { | ||
const { visibleEndIndex, visibleStartIndex } = state; | ||
@@ -30,3 +32,3 @@ const total = dimension.getTotalLength(); | ||
) { | ||
isEndReached = dimension.getOnEndReachedHelper().perform({ | ||
nextIsEndReached = dimension.getOnEndReachedHelper().perform({ | ||
...scrollMetrics, | ||
@@ -38,3 +40,3 @@ contentLength: dimension.getContainerOffset() + total, | ||
if (isEndReached) { | ||
if (nextIsEndReached) { | ||
return { | ||
@@ -41,0 +43,0 @@ type: ActionType.HydrationWithBatchUpdate, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1615180
19500