Skip to content

Commit

Permalink
Merge branch 'master' into list-view
Browse files Browse the repository at this point in the history
* master:
  fix: incorrect container width close #162
  • Loading branch information
BANG88 committed Dec 14, 2018
2 parents 41d65f2 + 3ed4645 commit 90f9d63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/tabs/DefaultTabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,11 @@ export class DefaultTabBar extends React.PureComponent<PropsType, StateType> {

onTabContainerLayout = (e: LayoutChangeEvent) => {
this._tabContainerMeasurements = e.nativeEvent.layout;
let width = this._tabContainerMeasurements.width;
if (width < WINDOW_WIDTH) {
width = WINDOW_WIDTH;
}
const width = this._tabContainerMeasurements.width;
// fix: https://github.com/ant-design/ant-design-mobile-rn/issues/162
// if (width < WINDOW_WIDTH) {
// width = WINDOW_WIDTH;
// }
this.setState({ _tabContainerWidth: width });
if (!this.props.dynamicTabUnderlineWidth) {
this.state._widthTabUnderline.setValue(width / this.props.tabs.length);
Expand Down

0 comments on commit 90f9d63

Please sign in to comment.