From 6893686c83883b4f16675279010ded291f81ebcf Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Wed, 28 Jun 2023 06:47:33 +0500 Subject: [PATCH] fix: use native flatlist for type in BaseInvertedFlatList --- src/components/InvertedFlatList/BaseInvertedFlatList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/InvertedFlatList/BaseInvertedFlatList.js b/src/components/InvertedFlatList/BaseInvertedFlatList.js index 4eb29af89cb3..d3fcda0ea5fd 100644 --- a/src/components/InvertedFlatList/BaseInvertedFlatList.js +++ b/src/components/InvertedFlatList/BaseInvertedFlatList.js @@ -2,7 +2,7 @@ import _ from 'underscore'; import React, {forwardRef, Component} from 'react'; import PropTypes from 'prop-types'; -import {View} from 'react-native'; +import {View, FlatList as NativeFlatlist} from 'react-native'; import * as CollectionUtils from '../../libs/CollectionUtils'; import FlatList from '../FlatList'; @@ -18,7 +18,7 @@ const propTypes = { initialRowHeight: PropTypes.number.isRequired, /** Passed via forwardRef so we can access the FlatList ref */ - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]).isRequired, + innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(NativeFlatlist)})]).isRequired, /** Should we measure these items and call getItemLayout? */ shouldMeasureItems: PropTypes.bool,