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

BUG: Tabs component does not allow switching for custom tabs #699

Closed
dlebedynskyi opened this issue Aug 9, 2016 · 0 comments
Closed

BUG: Tabs component does not allow switching for custom tabs #699

dlebedynskyi opened this issue Aug 9, 2016 · 0 comments

Comments

@dlebedynskyi
Copy link
Contributor

dlebedynskyi commented Aug 9, 2016

Create a tabs control with simmilar

getTabLabel = (icon, text) => (
        <span className={styles.labelContainer}>
            <i className="material-icons">{icon}</i>&nbsp;&nbsp;{text}
        </span>
    );
<Tabs index={index} className={styles.tabControl} onChange={onSwitchTab}>
                        <Tab key="details" label={this.getTabLabel('folder_open', 'Details')}></Tab>
<Tab key="two" label={this.getTabLabel('folder_closed', 'other TAB')}></Tab>
</Tabs>

when switching across tabs
image

I looks like

renderHeaders (headers) {
      return headers.map((item, idx) => {
        return React.cloneElement(item, {
          id: idx,
          key: idx,
          active: this.props.index === idx,
          onClick: this.handleHeaderClick
        });
      });
    }

stopped working correctly.
Expected - switch tab.
React-toolbox 1.1.1 react 15.3

Related to a825208#diff-0af98bf6739641f03f896377cce4b9a8L85

UPDATE:
using event.currentTarget instead of event.target

dlebedynskyi added a commit to dlebedynskyi/react-toolbox that referenced this issue Aug 9, 2016
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

2 participants