Skip to content

Commit 2d8213f

Browse files
authored
Merge pull request ptomasroos#534 from gmlion/master
setTimeout() instead of InteractionManager
2 parents 7d6ddf1 + fc7b1c4 commit 2d8213f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ const ScrollableTabView = React.createClass({
6565
},
6666

6767
componentDidMount() {
68-
InteractionManager.runAfterInteractions(() => {
68+
const scrollFn = () => {
6969
if (this.scrollView && Platform.OS === 'android') {
7070
const x = this.props.initialPage * this.state.containerWidth;
7171
this.scrollView.scrollTo({ x, animated: false });
7272
}
73-
});
73+
};
74+
this.setTimeout(() => {
75+
InteractionManager.runAfterInteractions(scrollFn);
76+
}, 0);
7477
},
7578

7679
componentWillReceiveProps(props) {

0 commit comments

Comments
 (0)