Skip to content

Commit

Permalink
fix SegmentedView.justifyItem='scrollable' bug, #41
Browse files Browse the repository at this point in the history
  • Loading branch information
rilyu committed Aug 22, 2017
1 parent 5720426 commit cf862cd
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions components/SegmentedView/SegmentedView.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,31 @@ export default class SegmentedView extends Component {
}

return (
<SegmentedBar
style={barStyle}
justifyItem={justifyItem}
indicatorType={indicatorType}
indicatorPosition={indicatorPosition}
indicatorLineColor={indicatorLineColor}
indicatorLineWidth={indicatorLineWidth}
indicatorPositionPadding={indicatorPositionPadding}
animated={animated}
autoScroll={autoScroll}
activeIndex={this.activeIndex}
onChange={index => this.onSegmentedBarChange(index)}
>
{children.map((item, index) => (
<SegmentedBar.Item
key={index}
title={item.props.title}
titleStyle={item.props.titleStyle}
activeTitleStyle={item.props.activeTitleStyle}
badge={item.props.badge}
/>
))}
</SegmentedBar>
<View>
<SegmentedBar
style={barStyle}
justifyItem={justifyItem}
indicatorType={indicatorType}
indicatorPosition={indicatorPosition}
indicatorLineColor={indicatorLineColor}
indicatorLineWidth={indicatorLineWidth}
indicatorPositionPadding={indicatorPositionPadding}
animated={animated}
autoScroll={autoScroll}
activeIndex={this.activeIndex}
onChange={index => this.onSegmentedBarChange(index)}
>
{children.map((item, index) => (
<SegmentedBar.Item
key={index}
title={item.props.title}
titleStyle={item.props.titleStyle}
activeTitleStyle={item.props.activeTitleStyle}
badge={item.props.badge}
/>
))}
</SegmentedBar>
</View>
);
}

Expand Down

1 comment on commit cf862cd

@t83714
Copy link

@t83714 t83714 commented on cf862cd Aug 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Works well now.

Please sign in to comment.