Add active setting to SUI <Tab> (#821)

This commit is contained in:
Stefanie Doll 2019-03-19 18:23:29 +01:00 committed by GitHub
parent b2b21cf744
commit 74479ab1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,8 @@ class General extends React.PureComponent<Props, State> {
private renderEndpoint = () => {
const { t } = this.props;
const { isUrlValid, settings: { apiUrl } } = this.state;
const { isCustomNode, isUrlValid, settings: { apiUrl } } = this.state;
const activeIndex = isCustomNode ? 1 : 0;
const preset = (
<Dropdown
@ -125,7 +126,7 @@ class General extends React.PureComponent<Props, State> {
];
return (
<Tab menu={{ secondary: true }} onTabChange={this.toggleCustomNode} panes={panes} />
<Tab menu={{ secondary: true }} activeIndex={activeIndex} onTabChange={this.toggleCustomNode} panes={panes} />
);
}