Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work for falsey values of name #58

Open
kanyuga opened this issue Sep 11, 2017 · 0 comments
Open

Does not work for falsey values of name #58

kanyuga opened this issue Sep 11, 2017 · 0 comments

Comments

@kanyuga
Copy link

kanyuga commented Sep 11, 2017

Since the selected value is calculated using (el.props.name || el.key) falsey values of el.props.name cause the current tab to not be identified properly e.g.

      <ScrollView>
        <Tabs
          style={{position: 'relative', top: 0}}
          selected={this.state.currentTab}
          onSelect={(el) => { this.switchTab(el.props.name) }}
          iconStyle={styles.tab}
          selectedIconStyle={styles.selectedTab}
          selectedStyle={styles.selectedTabText}
        >
          <Text name={0} style={styles.text}>Players</Text>
          <Text name={1} style={styles.text}>Log</Text>
        </Tabs>
        {this.props.children[this.state.currentTab]}
      </ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant