Closed
Description
Description
I am using scrollView when fetching data & changing scrollView position with "scrollView.scrollTo". I am getting error like bellow (Sometimes): ( In IOS, it is working )
com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'e.refs.scrollView.scrollTo'), stack:
value@605:5795
@605:6752
..............
............
Reproduction
var self = this;
Api.post(url, data_post, function(response) {
if(response) {
// my code updating the scrollView
............
self.refs.scrollViewEdit.scrollTo({y: 0});
}
self.setState({animating: false });
});
}
<ScrollView ref='scrollViewEdit'></ScrollView>
Additional Information
- React Native version: ["0.40.0"]
- Platform: [Android]
- Operating System: [Linux]