I have the following code in my component, where A
nad B
are my other components and SomeComponent
is where I am rendering A
and B
along with the TabExampleSecondaryPointing
component.
import { Tab } from 'semantic-ui-react';
const panes = [
{ menuItem: 'A', render: () => <Tab.Pane attached={false}> <A/> </Tab.Pane> },
{ menuItem: 'B', render: () => <Tab.Pane attached={false} > <B/> </Tab.Pane> },
]
const TabExampleSecondaryPointing = () => (
<Tab menu={{ secondary: true, pointing: true }} panes={panes} />
)
class SomeComponent extends Component {
render() {
return (
<div>
<TabExampleSecondaryPointing />
</div>
);
}
}
What I want to do is when I click some button inside of component A
(which is currently active in A Tab) the current or Active Tab should switch to B Tab. I am using Tabs component of Semantic UI for React. Any help would be much appreciated. Thanks.