@legendapp/list 3.0.0-beta.40 → 3.0.0-beta.42

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/reanimated.d.ts CHANGED
@@ -211,6 +211,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
211
211
  ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
212
212
  /**
213
213
  * If true, auto-scrolls to end when new items are added.
214
+ * Use an options object to opt into specific triggers and control whether that scroll is animated.
214
215
  * @default false
215
216
  */
216
217
  maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
@@ -388,10 +389,22 @@ interface AlwaysRenderConfig {
388
389
  indices?: number[];
389
390
  keys?: string[];
390
391
  }
392
+ interface MaintainScrollAtEndOnOptions {
393
+ dataChange?: boolean;
394
+ itemLayout?: boolean;
395
+ layout?: boolean;
396
+ }
391
397
  interface MaintainScrollAtEndOptions {
392
- onLayout?: boolean;
393
- onItemLayout?: boolean;
394
- onDataChange?: boolean;
398
+ /**
399
+ * Whether maintainScrollAtEnd should animate when it scrolls to the end.
400
+ */
401
+ animated?: boolean;
402
+ /**
403
+ * Which events should keep the list pinned to the end.
404
+ * - If omitted, object values default to all triggers.
405
+ * - If provided, only the keys set to `true` are enabled.
406
+ */
407
+ on?: MaintainScrollAtEndOnOptions;
395
408
  }
396
409
  interface ColumnWrapperStyle {
397
410
  rowGap?: number;
package/section-list.d.ts CHANGED
@@ -267,6 +267,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
267
267
  ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
268
268
  /**
269
269
  * If true, auto-scrolls to end when new items are added.
270
+ * Use an options object to opt into specific triggers and control whether that scroll is animated.
270
271
  * @default false
271
272
  */
272
273
  maintainScrollAtEnd?: boolean | MaintainScrollAtEndOptions;
@@ -444,10 +445,22 @@ interface AlwaysRenderConfig {
444
445
  indices?: number[];
445
446
  keys?: string[];
446
447
  }
448
+ interface MaintainScrollAtEndOnOptions {
449
+ dataChange?: boolean;
450
+ itemLayout?: boolean;
451
+ layout?: boolean;
452
+ }
447
453
  interface MaintainScrollAtEndOptions {
448
- onLayout?: boolean;
449
- onItemLayout?: boolean;
450
- onDataChange?: boolean;
454
+ /**
455
+ * Whether maintainScrollAtEnd should animate when it scrolls to the end.
456
+ */
457
+ animated?: boolean;
458
+ /**
459
+ * Which events should keep the list pinned to the end.
460
+ * - If omitted, object values default to all triggers.
461
+ * - If provided, only the keys set to `true` are enabled.
462
+ */
463
+ on?: MaintainScrollAtEndOnOptions;
451
464
  }
452
465
  interface ColumnWrapperStyle {
453
466
  rowGap?: number;