diff --git a/package.json b/package.json index cc75a3c..d5b4aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-infinite-virtualized-list", - "version": "0.1.12", + "version": "0.1.13", "homepage": "https://github.com/iwater/react-native-infinite-virtualized-list", "description": "A new InfiniteList that compose react-virtualized/InfiniteLoader with the react-native/VirtualizedList component, and a drop replacement component of react-native-gifted-listview", "main": "index.js", diff --git a/src/GiftedVirtualizedList.js b/src/GiftedVirtualizedList.js index 4cd1ebd..2139d7e 100644 --- a/src/GiftedVirtualizedList.js +++ b/src/GiftedVirtualizedList.js @@ -7,7 +7,7 @@ export default class GiftedVirtualizedList extends React.PureComponent { onFetch: PropTypes.func.isRequired, rowView: PropTypes.func.isRequired, paginationWaitingView: PropTypes.func.isRequired, - emptyView: PropTypes.func.isRequired, + emptyView: PropTypes.func, paginationAllLoadedView: PropTypes.func.isRequired, refreshable: PropTypes.bool.isRequired, enableEmptySections: PropTypes.bool.isRequired, @@ -67,7 +67,7 @@ export default class GiftedVirtualizedList extends React.PureComponent { const { list, hasNextPage, isNextPageLoading, refreshing } = this.state const { emptyView, paginationWaitingView, headerView, refreshable, ...otherProps } = this.props - if (list.length === 0) return emptyView() + if (emptyView && list.length === 0) return emptyView() return (