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

Initial activeTabIndex: 0 does not add .mdc-tab--active #75

Closed
jesnil01 opened this issue Jan 3, 2018 · 4 comments
Closed

Initial activeTabIndex: 0 does not add .mdc-tab--active #75

jesnil01 opened this issue Jan 3, 2018 · 4 comments
Labels

Comments

@jesnil01
Copy link
Contributor

jesnil01 commented Jan 3, 2018

What RMWC Version are you using?

0.0.1-rc12

What browser(s) and React Version is this bug affecting?

Chrome, Safari, Firefox

What build system are you using?

Webpack

What are the steps to reproduce the bug?

Clone master, install dependencies, run storybook
Navigate to "Tabs > TabBar"

What is the expected behavior?

The first tab should have the class .mdc-tab--active on mount.

What is the actual behavior?

The first tab is missing the class .mdc-tab--active.
It does add the class when navigating to another tab and then back.
It does add the class to the second tab when mounting with activeTabIndex: 1

Any other information you believe would be useful?

I've tried to debug this and see where it originates but without success.

@izakfilmalter
Copy link
Collaborator

I have the same issue. Have nasty short term hack:

<Tab className={activeTabIndex === 0 && 'mdc-tab--active'}>
  tab
</Tab>

Obviously you have to do this for each tab.

vdkdev pushed a commit to vdkdev/rmwc that referenced this issue Jan 4, 2018
vdkdev pushed a commit to vdkdev/rmwc that referenced this issue Jan 4, 2018
vdkdev pushed a commit to vdkdev/rmwc that referenced this issue Jan 4, 2018
@jamesmfriedman
Copy link
Collaborator

This should be fixed in V1 @jesnil01. Let me know if the issue persists.

@jesnil01
Copy link
Contributor Author

@jamesmfriedman Actually doesn't seems to work for me. Just cloned master and started storybook. Still no .mdc-tab--active class. You can see that first tab is missing the black color.

@jamesmfriedman
Copy link
Collaborator

jamesmfriedman commented Jan 17, 2018

@jesnil01
Please check out the relevant pending PR #97. Verification that it works would be helpful in getting it merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants