From 92cd43dff052d7ded2f7560d5f878b675c4d7c05 Mon Sep 17 00:00:00 2001 From: Sarah Scott Date: Wed, 14 Feb 2018 16:17:10 +0100 Subject: [PATCH] [react-native] updated scrollToIndex method of FlatList --- types/react-native/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a7fad4549a..656b1c2e0d 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3643,11 +3643,11 @@ export interface FlatListStatic extends React.ComponentClass void; /** - * Scrolls to the item at a the specified index such that it is positioned in the viewable area - * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the middle. - * May be janky without `getItemLayout` prop. + * Scrolls to the item at the specified index such that it is positioned in the viewable area + * such that viewPosition 0 places it at the top, 1 at the bottom, and 0.5 centered in the middle. + * Cannot scroll to locations outside the render window without specifying the getItemLayout prop. */ - scrollToIndex: (params: { animated?: boolean; index: number; viewPosition?: number }) => void; + scrollToIndex: (params: { animated?: boolean; index: number; viewOffset: number; viewPosition?: number }) => void; /** * Requires linear scan through data - use `scrollToIndex` instead if possible.