We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 75360db + 601090d commit ef1877bCopy full SHA for ef1877b
ScrollableTabBar.js
@@ -190,6 +190,13 @@ const ScrollableTabBar = React.createClass({
190
</View>;
191
},
192
193
+ componentWillReceiveProps(nextProps) {
194
+ // If the tabs change, force the width of the tabs container to be recalculated
195
+ if (JSON.stringify(this.props.tabs) != JSON.stringify(nextProps.tabs) && this.state._containerWidth) {
196
+ this.setState({ _containerWidth: null, });
197
+ }
198
+ },
199
+
200
onTabContainerLayout(e) {
201
this._tabContainerMeasurements = e.nativeEvent.layout;
202
let width = this._tabContainerMeasurements.width;
0 commit comments