interface LazyScrollViewMethods {
    scrollTo: (
        y?: number | { animated?: boolean; x?: number; y?: number },
        x?: number,
        animated?: boolean,
    ) => void;
    scrollToEnd: (options?: { animated: boolean }) => void;
    scrollToStart: (options?: { animated: boolean }) => void;
}

Properties

scrollTo: (
    y?: number | { animated?: boolean; x?: number; y?: number },
    x?: number,
    animated?: boolean,
) => void

Type declaration

    • (
          y?: number | { animated?: boolean; x?: number; y?: number },
          x?: number,
          animated?: boolean,
      ): void
    • Scrolls to a given x, y offset, either immediately or with a smooth animation. Syntax:

      scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})

      Note: The weird argument signature is due to the fact that, for historical reasons, the function also accepts separate arguments as an alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.

      Parameters

      • Optionaly: number | { animated?: boolean; x?: number; y?: number }
      • Optionalx: number
      • Optionalanimated: boolean

      Returns void

scrollToEnd: (options?: { animated: boolean }) => void

Type declaration

    • (options?: { animated: boolean }): void
    • A helper function that scrolls to the end of the scrollview; If this is a vertical ScrollView, it scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.

      The options object has an animated prop, that enables the scrolling animation or not. The animated prop defaults to true

      Parameters

      • Optionaloptions: { animated: boolean }

      Returns void

scrollToStart: (options?: { animated: boolean }) => void

Type declaration

    • (options?: { animated: boolean }): void
    • A helper function that scrolls to the end of the scrollview; If this is a vertical ScrollView, it scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.

      The options object has an animated prop, that enables the scrolling animation or not. The animated prop defaults to true

      Parameters

      • Optionaloptions: { animated: boolean }

      Returns void