react-infinite-scroll-component
react-infinite-scroll-component copied to clipboard
Scroll move back to top on loadmore data
<InfiniteScroll height={'800px'} dataLength={this.props.items.length} next={this.fetchMoreData} hasMore={true} loader={<></>} > {this.props.items.map((item, index) => { if((_this.props.filters.favourite == 1 && item.favourite == 1) || (_this.props.filters.favourite == 0)) {
return <items />
// </Animatable.View>
}
}
)}
</InfiniteScroll>
@yasir-rafiq I'm having the same issue, how did you solve it?
I think this has to do with the item list being passed as prop instead of an internal state. Hopefully the devs will se this.
solved! use InfiniteScroll component as parent Div
I am having the same issue did someone solved this issue?
solved! use InfiniteScroll component as parent Div
Solve because not caused re-render