From 131c7065319024aa2b6e7f1a5db10d10c4fd3bc3 Mon Sep 17 00:00:00 2001 From: Marco Cesarato Date: Wed, 19 Jan 2022 22:43:48 +0100 Subject: [PATCH] fix: add scroll view components types Ref: #141 --- lib/BigList.jsx | 2 +- lib/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BigList.jsx b/lib/BigList.jsx index 88bc5eb..ab84269 100644 --- a/lib/BigList.jsx +++ b/lib/BigList.jsx @@ -1128,7 +1128,7 @@ BigList.propTypes = { ]), sections: PropTypes.array, stickySectionHeadersEnabled: PropTypes.bool, - ScrollViewComponent: PropTypes.func, + ScrollViewComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.elementType]), }; BigList.defaultProps = { diff --git a/lib/index.d.ts b/lib/index.d.ts index 23da088..2c96474 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -78,7 +78,7 @@ interface BigListProps sections?: ItemT[][] | null | undefined; stickySectionHeadersEnabled?: boolean; children?: null | undefined; - ScrollViewComponent?: React.ComponentType; + ScrollViewComponent?: React.ComponentType | React.Component; } export default class BigList extends PureComponent< BigListProps