Skip to content

Commit d859068

Browse files
committed
Merge pull request ptomasroos#181 from rkostrab/master
Fix: scrollWithoutAnimationTo (which is deprecated) to scrollTo
2 parents 229e929 + 4dac89b commit d859068

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ScrollableTabBar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ var ScrollableTabBar = React.createClass({
6565
newScrollX = newScrollX >= 0 ? newScrollX : 0;
6666

6767
if (Platform === 'android') {
68-
this._scrollView.scrollWithoutAnimationTo(0, newScrollX);
68+
this._scrollView.scrollTo({x: newScrollX, y: 0});
6969
} else {
7070
const rightBoundScroll = this._tabContainerMeasurements.width - (this._containerMeasurements.width);
7171
newScrollX = newScrollX > rightBoundScroll ? rightBoundScroll : newScrollX;
72-
this._scrollView.scrollWithoutAnimationTo(0, newScrollX);
72+
this._scrollView.scrollTo({x: newScrollX, y: 0});
7373
}
7474

7575
},
@@ -201,4 +201,3 @@ var styles = StyleSheet.create({
201201
height: TAB_HEIGHT,
202202
}
203203
});
204-

0 commit comments

Comments
 (0)