Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
Revert to setting containerHeight explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
ezmiller committed Aug 28, 2016
1 parent dc2bf15 commit abf38e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beavy/jsbeavy/components/InfiniteList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default class InfiniteList extends Component {
super(props)
let minimalItemHeight = props.minimalItemHeight || 100
this.state = {
elementHeights: map(props.children, x => minimalItemHeight)
elementHeights: map(props.children, x => minimalItemHeight),
containerHeight: window.innerHeight - 60
}
}

Expand All @@ -54,11 +55,10 @@ export default class InfiniteList extends Component {
// prop to undefined, or not to set it all. We are setting it ot undefined
// when has_next == false.
return <Infinite elementHeight={this.state.elementHeights}
useWindowAsScrollContainer
containerHeight={this.state.containerHeight}
infiniteLoadBeginEdgeOffset={!this.props.meta.has_next ? undefined : 200}
onInfiniteLoad={::this.handleInfiniteLoad}
loadingSpinnerDelegate={this.elementInfiniteLoad()}
preloadBatchSize={Infinite.containerHeightScaleFactor(2)}
isInfiniteLoading={this.props.isFetching}
className='infinite-list'
scrollNumberCallback={this.scrollCallback}
Expand Down

0 comments on commit abf38e7

Please sign in to comment.