Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Problem when using with React-Custom-Scrollbars #285

Open
enesyteam opened this issue Nov 20, 2018 · 2 comments
Open

Problem when using with React-Custom-Scrollbars #285

enesyteam opened this issue Nov 20, 2018 · 2 comments

Comments

@enesyteam
Copy link

enesyteam commented Nov 20, 2018

Hi,

I'm using your library with react-custom-scrollbars and having an issue. This is my code:

<Scrollbars className="custom__scrollbars" height={ this.state.windowHeight - 54 } ref="conversationlistscroll" renderThumbVertical={props => <div {...props} className="c-scrollbar__bar"/>} renderTrackVertical={props => <div {...props} className="c-scrollbar__track"/>} renderTrackHorizontal={props => <div {...props} className="track-horizontal" style={{display:"none"}}/>} renderThumbHorizontal={props => <div {...props} className="thumb-horizontal" style={{display:"none"}}/>} autoHide autoHideTimeout={ 1000 } autoHideDuration={ 200 } onScroll={ this.handleScroll } > <Infinite elementHeight={ 80 } useWindowAsScrollContainer infiniteLoadBeginEdgeOffset={ 100 } onInfiniteLoad={this.handleInfiniteLoad} isInfiniteLoading={this.state.isInfiniteLoading} ref="mylist" > { conversations.length > 0 && conversations.map( this.renderConversation ) } </Infinite> </Scrollbars>

And this is handleScroll method:

handleScroll = () => { let scollTop = this.refs.conversationlistscroll.getScrollTop(); this.refs.mylist.handleScroll( scollTop ); }

Infinite load is OK for the first time infinite load:
1111

But when the second infinite load has error:

222222

Can you tell me how to resolve this problem, thanks you very much!

@tkuzenkova
Copy link

How did you resolve this issue?

@enesyteam
Copy link
Author

Finally I decided to build my own infinite list with custom scrollbar!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants