Skip to content

Commit

Permalink
fix(): initialPage not working on Android #2705 (#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkhiyori authored and sankhadeeproy007 committed Sep 10, 2019
1 parent 0457587 commit ea90755
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/basic/Tabs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ const ScrollableTabView = createReactClass({
}
};
InteractionManager.runAfterInteractions(scrollFn);
// because of contentOffset is not working on Android
setTimeout(() => {
this.scrollView.scrollTo({
x: this.props.initialPage * this.state.containerWidth,
animated: false,
});
});
},

UNSAFE_componentWillReceiveProps(props) {
Expand Down

0 comments on commit ea90755

Please sign in to comment.