Skip to content

Commit 10b4b95

Browse files
fatalsunfacebook-github-bot
authored andcommitted
Make onEndReachedThreshold=null match default value if prop not provided
Summary: This change makes the behavior of providing a null value to onEndReachedThreshold match the behavior of not providing the prop at all. ## Changelog: [General] [Changed] - Adjusted VirtualizedList's onEndReachedThreshold default value when null is provided Reviewed By: olegbl Differential Revision: D22870445 fbshipit-source-id: 29cbf0550702244007689759846ae0356f06b48d
1 parent 389b0b4 commit 10b4b95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Lists/VirtualizedList.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
14661466
const distanceFromEnd = contentLength - visibleLength - offset;
14671467
const threshold = onEndReachedThreshold
14681468
? onEndReachedThreshold * visibleLength
1469-
: 0;
1469+
: 2;
14701470
if (
14711471
onEndReached &&
14721472
this.state.last === getItemCount(data) - 1 &&

0 commit comments

Comments
 (0)