React-custom-scrollbars: I can't find a way to make this component auto scroll down

Created on 14 Mar 2017  路  1Comment  路  Source: malte-wessel/react-custom-scrollbars

lets say I am rendering data dynamically
In the end data will exceed the length of container which will make the scroll bar to be activated.
I am looking for a way to make the element scroll down as a default
I've tried to use "onUpdate" property but without success

Thanks,
Asaf

Most helpful comment

<Scrollbars style={{ height: 450, width: '100%' }} ref="scrollbars"> ... </Scrollbars>

manage to do so by adding a ref.. and then the ref object add all the methods...
and then did this ->
componentDidUpdate() { const { scrollbars } = this.refs scrollbars.scrollTop(scrollbars.getScrollHeight()) }

>All comments

<Scrollbars style={{ height: 450, width: '100%' }} ref="scrollbars"> ... </Scrollbars>

manage to do so by adding a ref.. and then the ref object add all the methods...
and then did this ->
componentDidUpdate() { const { scrollbars } = this.refs scrollbars.scrollTop(scrollbars.getScrollHeight()) }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilfa picture ilfa  路  5Comments

magnetronnie picture magnetronnie  路  3Comments

danmo picture danmo  路  4Comments

Amdingo picture Amdingo  路  4Comments

mhemrg picture mhemrg  路  4Comments