jsdevkr / react-chatview

Infinite scroll chat or feed component for React.js
Other
216 stars 43 forks source link

onInfiniteLoad not firing? #34

Open jasongrishkoff opened 6 years ago

jasongrishkoff commented 6 years ago

I've tried implementing this with npm, but finding that the onInfiniteLoad doesn't ever fire? Is there some magic trick I'm missing here?

<ChatView
  flipped={true}
  reversed={true}
  scrollLoadThreshold={200}
  onInfiniteLoad={this.loadMore}
>   
    {this.renderChats()}
</ChatView>
this.loadMore = () => {
  console.log('Loading more!')
  this.setState({limit:this.state.limit + 20})
}
gimdongwoo commented 6 years ago

Sorry. I'm late.

onInfiniteLoad trigging need to shouldTriggerLoad() results is true.

You can add shouldTriggerLoad={() => { return true; }}

yonahforst commented 6 years ago

@jasongrishkoff @gimdongwoo - having the same problem, even with shouldTriggerLoad returning true

theinvensi commented 6 years ago

Same problem here!