Closed lc00 closed 7 years ago
Hi @lc00, Thank you for giving me an issue~
I think the usage of scrollToY()
method is well explained in documentation. But I will give you full example for sure.
import React from 'react';
import ReactDOM from 'react-dom';
import ReactScrollbar from 'react-scrollbar-js';
class App extends React.Component {
render(){
return(
<ReactScrollbar className="my-scrollbar" speed={ 100 } ref="Scrollbar">
<div className="should-have-a-children scroll-me">
<p>And Now</p>
<p>You Can Put</p>
<p>A Long Content Here</p>
</div>
</ReactScrollbar>
)
}
// Examples
someMethod() {
this.refs.Scrollbar.scrollToY(100)
}
}
ReactDOM.render(<App />, document.getElementById("app"))
Thanks!
Hiii,
I am having trouble to figure out how to apply the scrollToY() method. Could you please add a more detailed example or add into your current usage example on how to use scrollToY() method please?
Thanks!