material-ui
material-ui copied to clipboard
Tabs not change components [material-ui@next]
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
export class Header extends Component<any, any> {
private tabs_changeHandler ( event: any, value: any ): void {
this.props.tabs.to( value );
}
public render (): ReactElement<any> {
let { tabs } = this.props;
let { activeTabId } = tabs;
return (
<AppBar position="static">
<Tabs value={activeTabId} onChange={( e, v ) => this.tabs_changeHandler( e, v )}>
<Tab value="a" label={<Link to="/a">...</Link>}/>
<Tab value="b" label={<Link to="/b">...</Link>}/>
</Tabs>
</AppBar>
);
};
}
// ...
tabs.to( 'b' );
// set selected and change component (Link)
Current Behavior
...code...
// ...
tabs.to( 'b' );
// set selected only
Steps to Reproduce (for bugs)
1. 2. 3. 4.
Context
Your Environment
| Tech | Version |
|---|---|
| Material-UI | material-ui@next v^1.0.0-beta.23 |
| React | ^16.2.0 |
| browser | |
| etc |
@acopalipsis Please refine your issue. I don't see your point.
Your issue has been closed because it does not conform to our issue requirements. Please provide a full reproduction test case. This would help a lot 👷 . A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!