Skip to content

Commit

Permalink
emptyView not require
Browse files Browse the repository at this point in the history
  • Loading branch information
iwater committed Feb 4, 2018
1 parent 547ed15 commit 64192e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/GiftedVirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 (
<InfiniteVirtualizedList
data={list}
Expand Down

0 comments on commit 64192e1

Please sign in to comment.