From 1e82b25e3e44e752368b43c33549f899d037aba5 Mon Sep 17 00:00:00 2001 From: Ben Wildeman Date: Fri, 2 Mar 2018 10:20:28 +0000 Subject: [PATCH] [react-native] updated viewOffset on FlatList to be optional although the react-native docs says that viewOffset is required, the flow types of the flatlist, and the code for the flatlist shows that this is actually optional and defaults to 0 when not used. --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 1faa31da8f..01b7651dec 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3652,7 +3652,7 @@ export interface FlatListStatic extends React.ComponentClass void; + scrollToIndex: (params: { animated?: boolean; index: number; viewOffset?: number; viewPosition?: number }) => void; /** * Requires linear scan through data - use `scrollToIndex` instead if possible.