Added disableInfiniteScroll prop to ScrollableList component
• Added: - disableInfiniteScroll prop to ScrollableList component
This commit is contained in:
parent
6247c32206
commit
b6f8674054
|
@ -98,7 +98,7 @@ class ScrollableList extends React.PureComponent {
|
|||
const { innerHeight } = this.window;
|
||||
const offset = scrollHeight - scrollTop - innerHeight;
|
||||
|
||||
if (600 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
|
||||
if (600 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading && !this.props.disableInfiniteScroll) {
|
||||
this.props.onLoadMore();
|
||||
}
|
||||
|
||||
|
@ -271,6 +271,7 @@ ScrollableList.propTypes = {
|
|||
onScroll: PropTypes.func,
|
||||
placeholderComponent: PropTypes.node,
|
||||
placeholderCount: PropTypes.node,
|
||||
disableInfiniteScroll: PropTypes.bool,
|
||||
}
|
||||
|
||||
export default ScrollableList
|
Loading…
Reference in New Issue