@react-native-tvos/virtualized-lists 0.77.0-0rc5 → 0.78.0-0rc4
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/VirtualizeUtils.js +14 -2
- package/Lists/VirtualizedList.js +1 -0
- package/package.json +4 -4
package/Lists/VirtualizeUtils.js
CHANGED
|
@@ -14,6 +14,8 @@ import type ListMetricsAggregator, {
|
|
|
14
14
|
CellMetricProps,
|
|
15
15
|
} from './ListMetricsAggregator';
|
|
16
16
|
|
|
17
|
+
import * as ReactNativeFeatureFlags from 'react-native/src/private/featureflags/ReactNativeFeatureFlags';
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* Used to find the indices of the frames that overlap the given offsets. Useful for finding the
|
|
19
21
|
* items that bound different windows of content, such as the visible area or the buffered overscan
|
|
@@ -176,10 +178,20 @@ export function computeWindowedRenderLimits(
|
|
|
176
178
|
break;
|
|
177
179
|
}
|
|
178
180
|
const maxNewCells = newCellCount >= maxToRenderPerBatch;
|
|
179
|
-
|
|
181
|
+
|
|
182
|
+
let firstWillAddMore;
|
|
183
|
+
let lastWillAddMore;
|
|
184
|
+
|
|
185
|
+
if (ReactNativeFeatureFlags.fixVirtualizeListCollapseWindowSize()) {
|
|
186
|
+
firstWillAddMore = first <= prev.first;
|
|
187
|
+
lastWillAddMore = last >= prev.last;
|
|
188
|
+
} else {
|
|
189
|
+
firstWillAddMore = first <= prev.first || first > prev.last;
|
|
190
|
+
lastWillAddMore = last >= prev.last || last < prev.first;
|
|
191
|
+
}
|
|
192
|
+
|
|
180
193
|
const firstShouldIncrement =
|
|
181
194
|
first > overscanFirst && (!maxNewCells || !firstWillAddMore);
|
|
182
|
-
const lastWillAddMore = last >= prev.last || last < prev.first;
|
|
183
195
|
const lastShouldIncrement =
|
|
184
196
|
last < overscanLast && (!maxNewCells || !lastWillAddMore);
|
|
185
197
|
if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {
|
package/Lists/VirtualizedList.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-tvos/virtualized-lists",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0-0rc4",
|
|
4
4
|
"description": "Virtualized lists for React Native.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"nullthrows": "^1.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"react-test-renderer": "
|
|
27
|
+
"react-test-renderer": "19.0.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@types/react": "^
|
|
30
|
+
"@types/react": "^19.0.0",
|
|
31
31
|
"react": "*",
|
|
32
|
-
"react-native
|
|
32
|
+
"react-native": "*"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@types/react": {
|