react-infinite-scroll-component
react-infinite-scroll-component copied to clipboard
How to use infinite scroll with custom scroll library?
I'm using this lib https://github.com/KingSora/OverlayScrollbars for customizing scrollbar and want to use infinite scroll. Infinite scroll works fine without a custom scroll lib. But I need to use both these libs. I tried to set scrollableTarget with id of the custom scroll but it doesn't work. Please help.
<InfiniteScroll
dataLength={filteredElements.length} //This is important field to render the next data
next={this.loadMoreElements}
hasMore={true}
loader={<h4>Loading...</h4>}
endMessage={
<p style={{ textAlign: 'center' }}>
<b>Yay! You have seen it all</b>
</p>
}
scrollableTarget="os-viewport-scroll"
>
<div className="row">
<Loading small={true} classes="position-fixed"/>
{filteredElements.map((object_item, i) => {
return <ElementCard object_item={object_item} key={i} printMode={printMode} main_content_language={this.props.main_content_language}
deleteMode={delete_objects_mode} callbackCheck={this.callbackCheck}/>
})}
</div>
</InfiniteScroll>`
Hi @lossen, did you manage to make this work? Encountering this issue as well...