@legendapp/list 3.0.1 → 3.0.2
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/react-native.js +5 -5
- package/react-native.mjs +5 -5
- package/react-native.web.js +4 -1
- package/react-native.web.mjs +4 -1
- package/react.js +4 -1
- package/react.mjs +4 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/react-native.js
CHANGED
|
@@ -2199,10 +2199,7 @@ function requestAdjust(ctx, positionDiff, dataChanged) {
|
|
|
2199
2199
|
const needsScrollWorkaround = Platform.OS === "android" && !IsNewArchitecture && dataChanged && state.scroll <= positionDiff;
|
|
2200
2200
|
const doit = () => {
|
|
2201
2201
|
if (needsScrollWorkaround) {
|
|
2202
|
-
|
|
2203
|
-
noScrollingTo: true,
|
|
2204
|
-
offset: state.scroll
|
|
2205
|
-
});
|
|
2202
|
+
doScrollTo(ctx, { horizontal: state.props.horizontal, offset: state.scroll });
|
|
2206
2203
|
} else {
|
|
2207
2204
|
state.scrollAdjustHandler.requestAdjust(positionDiff);
|
|
2208
2205
|
if (state.adjustingFromInitialMount) {
|
|
@@ -4511,7 +4508,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
4511
4508
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
4512
4509
|
};
|
|
4513
4510
|
updateScrollRange();
|
|
4514
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
4511
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
4515
4512
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
4516
4513
|
if (top === null && bottom === null) {
|
|
4517
4514
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -6367,6 +6364,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
6367
6364
|
});
|
|
6368
6365
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
6369
6366
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
6367
|
+
if (viewability) {
|
|
6368
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
6369
|
+
}
|
|
6370
6370
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
6371
6371
|
useInit(() => {
|
|
6372
6372
|
if (!IsNewArchitecture) {
|
package/react-native.mjs
CHANGED
|
@@ -2178,10 +2178,7 @@ function requestAdjust(ctx, positionDiff, dataChanged) {
|
|
|
2178
2178
|
const needsScrollWorkaround = Platform.OS === "android" && !IsNewArchitecture && dataChanged && state.scroll <= positionDiff;
|
|
2179
2179
|
const doit = () => {
|
|
2180
2180
|
if (needsScrollWorkaround) {
|
|
2181
|
-
|
|
2182
|
-
noScrollingTo: true,
|
|
2183
|
-
offset: state.scroll
|
|
2184
|
-
});
|
|
2181
|
+
doScrollTo(ctx, { horizontal: state.props.horizontal, offset: state.scroll });
|
|
2185
2182
|
} else {
|
|
2186
2183
|
state.scrollAdjustHandler.requestAdjust(positionDiff);
|
|
2187
2184
|
if (state.adjustingFromInitialMount) {
|
|
@@ -4490,7 +4487,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
4490
4487
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
4491
4488
|
};
|
|
4492
4489
|
updateScrollRange();
|
|
4493
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
4490
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
4494
4491
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
4495
4492
|
if (top === null && bottom === null) {
|
|
4496
4493
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -6346,6 +6343,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
6346
6343
|
});
|
|
6347
6344
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
6348
6345
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
6346
|
+
if (viewability) {
|
|
6347
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
6348
|
+
}
|
|
6349
6349
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
6350
6350
|
useInit(() => {
|
|
6351
6351
|
if (!IsNewArchitecture) {
|
package/react-native.web.js
CHANGED
|
@@ -5164,7 +5164,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
5164
5164
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
5165
5165
|
};
|
|
5166
5166
|
updateScrollRange();
|
|
5167
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5167
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5168
5168
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
5169
5169
|
if (top === null && bottom === null) {
|
|
5170
5170
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -7000,6 +7000,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
7000
7000
|
});
|
|
7001
7001
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
7002
7002
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
7003
|
+
if (viewability) {
|
|
7004
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
7005
|
+
}
|
|
7003
7006
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
7004
7007
|
useInit(() => {
|
|
7005
7008
|
});
|
package/react-native.web.mjs
CHANGED
|
@@ -5143,7 +5143,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
5143
5143
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
5144
5144
|
};
|
|
5145
5145
|
updateScrollRange();
|
|
5146
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5146
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5147
5147
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
5148
5148
|
if (top === null && bottom === null) {
|
|
5149
5149
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -6979,6 +6979,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
6979
6979
|
});
|
|
6980
6980
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
6981
6981
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
6982
|
+
if (viewability) {
|
|
6983
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
6984
|
+
}
|
|
6982
6985
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
6983
6986
|
useInit(() => {
|
|
6984
6987
|
});
|
package/react.js
CHANGED
|
@@ -5164,7 +5164,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
5164
5164
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
5165
5165
|
};
|
|
5166
5166
|
updateScrollRange();
|
|
5167
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5167
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5168
5168
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
5169
5169
|
if (top === null && bottom === null) {
|
|
5170
5170
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -7000,6 +7000,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
7000
7000
|
});
|
|
7001
7001
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
7002
7002
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
7003
|
+
if (viewability) {
|
|
7004
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
7005
|
+
}
|
|
7003
7006
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
7004
7007
|
useInit(() => {
|
|
7005
7008
|
});
|
package/react.mjs
CHANGED
|
@@ -5143,7 +5143,7 @@ function calculateItemsInView(ctx, params = {}) {
|
|
|
5143
5143
|
scrollBottomBuffered = scrollBottom + scrollBufferBottom;
|
|
5144
5144
|
};
|
|
5145
5145
|
updateScrollRange();
|
|
5146
|
-
if (!suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5146
|
+
if (enableScrollForNextCalculateItemsInView && !suppressInitialScrollSideEffects && !dataChanged && !forceFullItemPositions && scrollForNextCalculateItemsInView) {
|
|
5147
5147
|
const { top, bottom } = scrollForNextCalculateItemsInView;
|
|
5148
5148
|
if (top === null && bottom === null) {
|
|
5149
5149
|
state.scrollForNextCalculateItemsInView = void 0;
|
|
@@ -6979,6 +6979,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
6979
6979
|
});
|
|
6980
6980
|
state.viewabilityConfigCallbackPairs = viewability;
|
|
6981
6981
|
state.enableScrollForNextCalculateItemsInView = !viewability;
|
|
6982
|
+
if (viewability) {
|
|
6983
|
+
state.scrollForNextCalculateItemsInView = void 0;
|
|
6984
|
+
}
|
|
6982
6985
|
}, [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]);
|
|
6983
6986
|
useInit(() => {
|
|
6984
6987
|
});
|