Skip to content

Tabs: Cannot set the index of tab programmatically.  #8809

@jstralko

Description

@jstralko

When trying to set the index of tab programmatically from componentDidMount the Tab indicator doesn't change.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When changing the index in state the Tabs component should update the indicator.

Current Behavior

The indicator doesn't change even when the render is called again with the correct index from state.

Steps to Reproduce (for bugs)

Here is a codesandbox.io:

https://codesandbox.io/s/ykn36kzyj

The indicator should be set for index 1 but the indicator is set to index 0.

This worked earlier, I noticed this issue when I updated material-ui to beta-17

Context

Your Environment

Tech Version
Material-UI 1.0.0.Beta17
React 16.0.0
browser Chrome

Metadata

Metadata

Labels

scope: tabsChanges related to the tabs.type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions