@react-native/virtualized-lists 0.77.0-nightly-20241007-d0912ed06 → 0.77.0-nightly-20241009-e4814b0d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Lists/VirtualizedList.js
CHANGED
|
@@ -1181,12 +1181,6 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1181
1181
|
if (hiPriInProgress) {
|
|
1182
1182
|
this._hiPriInProgress = false;
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1185
|
-
// We only call `onEndReached` after we render the last cell, but when
|
|
1186
|
-
// getItemLayout is present, we can scroll past the last rendered cell, and
|
|
1187
|
-
// never trigger a new layout or bounds change, so we need to check again
|
|
1188
|
-
// after rendering more cells.
|
|
1189
|
-
this._maybeCallOnEdgeReached();
|
|
1190
1184
|
}
|
|
1191
1185
|
|
|
1192
1186
|
_cellRefs: {[string]: null | CellRenderer<any>} = {};
|
|
@@ -1497,20 +1491,11 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1497
1491
|
const {
|
|
1498
1492
|
data,
|
|
1499
1493
|
getItemCount,
|
|
1500
|
-
getItemLayout,
|
|
1501
1494
|
onStartReached,
|
|
1502
1495
|
onStartReachedThreshold,
|
|
1503
1496
|
onEndReached,
|
|
1504
1497
|
onEndReachedThreshold,
|
|
1505
1498
|
} = this.props;
|
|
1506
|
-
// Wait until we have real metrics
|
|
1507
|
-
if (
|
|
1508
|
-
!this._listMetrics.hasContentLength() ||
|
|
1509
|
-
this._scrollMetrics.visibleLength === 0
|
|
1510
|
-
) {
|
|
1511
|
-
return;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
1499
|
// If we have any pending scroll updates it means that the scroll metrics
|
|
1515
1500
|
// are out of date and we should not call any of the edge reached callbacks.
|
|
1516
1501
|
if (this.state.pendingScrollUpdateCount > 0) {
|
|
@@ -1553,9 +1538,6 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1553
1538
|
if (
|
|
1554
1539
|
onEndReached &&
|
|
1555
1540
|
this.state.cellsAroundViewport.last === getItemCount(data) - 1 &&
|
|
1556
|
-
(getItemLayout != null ||
|
|
1557
|
-
this._listMetrics.getHighestMeasuredCellIndex() ===
|
|
1558
|
-
getItemCount(data) - 1) &&
|
|
1559
1541
|
isWithinEndThreshold &&
|
|
1560
1542
|
this._listMetrics.getContentLength() !== this._sentEndForContentLength
|
|
1561
1543
|
) {
|
|
@@ -601,11 +601,13 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {
|
|
|
601
601
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
602
602
|
* parameters */
|
|
603
603
|
// $FlowFixMe[method-unbinding]
|
|
604
|
-
module.exports =
|
|
605
|
-
React.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
604
|
+
module.exports = VirtualizedSectionList as component(
|
|
605
|
+
ref: React.RefSetter<
|
|
606
|
+
$ReadOnly<{
|
|
607
|
+
+getListRef: () => ?React.ElementRef<typeof VirtualizedList>,
|
|
608
|
+
+scrollToLocation: (params: ScrollToLocationParamsType) => void,
|
|
609
|
+
...
|
|
610
|
+
}>,
|
|
611
|
+
>,
|
|
612
|
+
...React.ElementConfig<typeof VirtualizedSectionList>
|
|
613
|
+
);
|
package/package.json
CHANGED