Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add a unique key to tab page mapping (for Android). fixes #86
  • Loading branch information
Jacob Patenaude committed Dec 8, 2015
commit 3eb27bdee46de1302001f94ed5da7e3300236e8c
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ var ScrollableTabView = React.createClass({
this._updateScrollValue(position + offset);
}}
ref={(scrollView) => { this.scrollView = scrollView }}>
{this.props.children.map((child) => {
return <View style={{width: deviceWidth}}>{child}</View>
{this.props.children.map((child,idx) => {
return <View
key={child.props.tabLabel + '_' + idx}
style={{width: deviceWidth}}>
{child}
</View>
})}
</ViewPagerAndroid>
);
Expand Down