From 6f13f3dcba7ea48db254a36c3a648682cde2820f Mon Sep 17 00:00:00 2001 From: mcousillas6 Date: Sun, 13 Aug 2017 19:50:35 -0300 Subject: [PATCH] Added missing type cases for ItemSeparatorComponent on react-native FlatList --- types/react-native/index.d.ts | 2 +- types/react-native/test/index.tsx | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 629c8a8fd5..1229f55acb 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3491,7 +3491,7 @@ export interface FlatListProperties extends VirtualizedListProperties | null + ItemSeparatorComponent?: React.ComponentClass | React.ReactElement | (() => React.ReactElement) | null /** * Rendered when the list is empty. diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 29ff38508a..925d50f61c 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -208,11 +208,22 @@ InteractionManager.runAfterInteractions(() => { }).then(() => 'done') export class FlatListTest extends React.Component, {}> { + _renderItem = (rowData: any) => { + return ( + + {rowData.item} + + ); + } + + _renderSeparator= () => + render() { return ( {info.item}} + renderItem={this._renderItem} + ItemSeparatorComponent={this._renderSeparator} /> ); }