Closed hackerslizc closed 8 years ago
@hackerslizc
API for that https://github.com/schovi/react-iscroll#function-componentwithiscrollwaitforinit-callback
Usage with your case:
gotoTopHandler(){
var reactscroll = this.refs.reactIScroll;
reactscroll.withIScroll(function(iScroll) {
// iScroll is now instance of iScroll and not the component
iScroll.scrollTo(0,0)
})
}
Changed readme with your example. It is more self explain :)
thanks for your help。
i want use scrollTo() back Top like reactIScroll.scrollTo(0,0), can you tall me ,how can I do?