Skip to content

Commit e5b6d1f

Browse files
committed
use new scrollTo() API call since react-native 0.20
1 parent ab4052a commit e5b6d1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GiftedListView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ var GiftedListView = React.createClass({
268268

269269
_onRefresh(options = {}) {
270270
if (this.isMounted()) {
271-
this._scrollResponder.scrollTo(0);
271+
this._scrollResponder.scrollTo({y: 0});
272272
this.setState({
273273
refreshStatus: 'fetching',
274274
isRefreshing: true,
@@ -284,7 +284,7 @@ var GiftedListView = React.createClass({
284284
if (this.props.refreshable === true && Platform.OS !== 'android') {
285285
// @issue
286286
// if a scrolling is already in progress, this scroll will not be executed
287-
this._scrollResponder.scrollTo(this.props.refreshableViewHeight);
287+
this._scrollResponder.scrollTo({y: this.props.refreshableViewHeight});
288288
}
289289
}
290290
},

0 commit comments

Comments
 (0)