@legendapp/list 2.0.14 → 2.0.15
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/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +3 -2
- package/index.mjs +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 2.0.15
|
|
2
|
+
- Fix: Container allocation for sticky headers could duplicate containers, causing rendering issues
|
|
3
|
+
- Fix: Sticky positioned components scrolling out of viewport after scrolling distance exceeded 5000
|
|
4
|
+
|
|
1
5
|
## 2.0.14
|
|
2
6
|
- Feat: Add dataVersion prop to trigger re-render when mutating the data array in place
|
|
3
7
|
|
package/index.d.mts
CHANGED
|
@@ -246,6 +246,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
246
246
|
refreshing?: boolean;
|
|
247
247
|
/**
|
|
248
248
|
* Render custom ScrollView component.
|
|
249
|
+
* Note: When using `stickyHeaderIndices`, you must provide an Animated ScrollView component.
|
|
249
250
|
* @default (props) => <ScrollView {...props} />
|
|
250
251
|
*/
|
|
251
252
|
renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
|
package/index.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
246
246
|
refreshing?: boolean;
|
|
247
247
|
/**
|
|
248
248
|
* Render custom ScrollView component.
|
|
249
|
+
* Note: When using `stickyHeaderIndices`, you must provide an Animated ScrollView component.
|
|
249
250
|
* @default (props) => <ScrollView {...props} />
|
|
250
251
|
*/
|
|
251
252
|
renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
|
package/index.js
CHANGED
|
@@ -286,7 +286,8 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
286
286
|
const transform = React2__namespace.useMemo(() => {
|
|
287
287
|
if (animatedScrollY && stickyOffset !== void 0) {
|
|
288
288
|
const stickyPosition = animatedScrollY.interpolate({
|
|
289
|
-
|
|
289
|
+
extrapolateLeft: "clamp",
|
|
290
|
+
extrapolateRight: "extend",
|
|
290
291
|
inputRange: [position + headerSize, position + 5e3 + headerSize],
|
|
291
292
|
outputRange: [position, position + 5e3]
|
|
292
293
|
});
|
|
@@ -1549,7 +1550,7 @@ function findAvailableContainers(ctx, state, numNeeded, startBuffered, endBuffer
|
|
|
1549
1550
|
for (const containerIndex of stickyContainerPool) {
|
|
1550
1551
|
const key = peek$(ctx, `containerItemKey${containerIndex}`);
|
|
1551
1552
|
const isPendingRemoval = pendingRemovalSet.has(containerIndex);
|
|
1552
|
-
if ((key === void 0 || isPendingRemoval) && canReuseContainer(containerIndex, requiredType)) {
|
|
1553
|
+
if ((key === void 0 || isPendingRemoval) && canReuseContainer(containerIndex, requiredType) && !result.includes(containerIndex)) {
|
|
1553
1554
|
result.push(containerIndex);
|
|
1554
1555
|
if (isPendingRemoval && pendingRemovalSet.delete(containerIndex)) {
|
|
1555
1556
|
pendingRemovalChanged = true;
|
package/index.mjs
CHANGED
|
@@ -265,7 +265,8 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
265
265
|
const transform = React2.useMemo(() => {
|
|
266
266
|
if (animatedScrollY && stickyOffset !== void 0) {
|
|
267
267
|
const stickyPosition = animatedScrollY.interpolate({
|
|
268
|
-
|
|
268
|
+
extrapolateLeft: "clamp",
|
|
269
|
+
extrapolateRight: "extend",
|
|
269
270
|
inputRange: [position + headerSize, position + 5e3 + headerSize],
|
|
270
271
|
outputRange: [position, position + 5e3]
|
|
271
272
|
});
|
|
@@ -1528,7 +1529,7 @@ function findAvailableContainers(ctx, state, numNeeded, startBuffered, endBuffer
|
|
|
1528
1529
|
for (const containerIndex of stickyContainerPool) {
|
|
1529
1530
|
const key = peek$(ctx, `containerItemKey${containerIndex}`);
|
|
1530
1531
|
const isPendingRemoval = pendingRemovalSet.has(containerIndex);
|
|
1531
|
-
if ((key === void 0 || isPendingRemoval) && canReuseContainer(containerIndex, requiredType)) {
|
|
1532
|
+
if ((key === void 0 || isPendingRemoval) && canReuseContainer(containerIndex, requiredType) && !result.includes(containerIndex)) {
|
|
1532
1533
|
result.push(containerIndex);
|
|
1533
1534
|
if (isPendingRemoval && pendingRemovalSet.delete(containerIndex)) {
|
|
1534
1535
|
pendingRemovalChanged = true;
|
package/package.json
CHANGED