diff --git a/index.js b/index.js index 82e53c54..c18e54c0 100644 --- a/index.js +++ b/index.js @@ -119,7 +119,7 @@ const ScrollableTabView = createReactClass({ this.updateSceneKeys({ page: this.state.currentPage, children: this.props.children, }); } - if (this.props.page >= 0 && this.props.page !== this.state.currentPage) { + if (this.props.page !== prevProps.page && this.props.page >= 0 && this.props.page !== this.state.currentPage) { this.goToPage(this.props.page); } }, @@ -339,7 +339,7 @@ const ScrollableTabView = createReactClass({ if (!width || width <= 0 || Math.round(width) === Math.round(this.state.containerWidth)) { return; } - + if (Platform.OS === 'ios') { const containerWidthAnimatedValue = new Animated.Value(width); // Need to call __makeNative manually to avoid a native animated bug. See