From 5cbd163042a03720181480e10151c0929bd365f0 Mon Sep 17 00:00:00 2001 From: wardy Date: Thu, 29 Mar 2018 16:20:12 +0100 Subject: [PATCH] Change proptypes intended for rendering react elements to node --- dist/InfiniteScroll.js | 7 ++----- src/InfiniteScroll.js | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dist/InfiniteScroll.js b/dist/InfiniteScroll.js index 6a7e623..e730573 100644 --- a/dist/InfiniteScroll.js +++ b/dist/InfiniteScroll.js @@ -317,15 +317,12 @@ var InfiniteScroll = (function(_Component) { })(_react.Component); InfiniteScroll.propTypes = { - children: _propTypes2.default.oneOfType([ - _propTypes2.default.object, - _propTypes2.default.array, - ]).isRequired, + children: _propTypes2.default.node.isRequired, element: _propTypes2.default.string, hasMore: _propTypes2.default.bool, initialLoad: _propTypes2.default.bool, isReverse: _propTypes2.default.bool, - loader: _propTypes2.default.object, + loader: _propTypes2.default.node, loadMore: _propTypes2.default.func.isRequired, pageStart: _propTypes2.default.number, ref: _propTypes2.default.func, diff --git a/src/InfiniteScroll.js b/src/InfiniteScroll.js index b94c8e4..ae2e2fb 100644 --- a/src/InfiniteScroll.js +++ b/src/InfiniteScroll.js @@ -3,13 +3,12 @@ import PropTypes from 'prop-types'; export default class InfiniteScroll extends Component { static propTypes = { - children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]) - .isRequired, + children: PropTypes.node.isRequired, element: PropTypes.string, hasMore: PropTypes.bool, initialLoad: PropTypes.bool, isReverse: PropTypes.bool, - loader: PropTypes.object, + loader: PropTypes.node, loadMore: PropTypes.func.isRequired, pageStart: PropTypes.number, ref: PropTypes.func,