import React from 'react' ; import { FlatList , FlatListProps } from 'react-native' ; import { ScrollViewWithOverlay , ScrollViewWithOverlayProps , } from './ScrollViewWithOverlay' ; export interface FlatListWithOverlayProps < TItem > extends FlatListProps < TItem > , ScrollViewWithOverlayProps { keyExtractor : NonNullable < FlatListProps < TItem > [ 'keyExtractor' ] > ; } export const FlatListWithOverlay = React . forwardRef ( ( props , ref ) => { return ( < ScrollViewWithOverlay ref = { ref } { ... props } ScrollViewComponent = { FlatList } / > ) ; } ) ; FlatListWithOverlay . displayName = 'FlatListWithOverlay' ;