We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the below code. I change activeTab by clicking other button but Tabs not change
activeTab
import React, { useState } from 'react'; import { CTab, CTabContent, CTabList, CTabPanel, CTabs } from '@coreui/react'; export const TabsControlledExample = () => { const [activeTab, setActiveTab] = useState('profile'); const [tName, setTName] = useState('contact'); const onClick = () => { console.log(tName); setActiveTab(tName); }; return ( <> <input defaultValue={tName} onChange={(e) => setTName(e.target.value)} /> <button onClick={onClick}>click here</button> <CTabs activeItemKey={activeTab} onChange={setActiveTab}> <CTabList variant="tabs"> <CTab itemKey="home">Home</CTab> <CTab itemKey="profile">Profile</CTab> <CTab itemKey="contact">Contact</CTab> <CTab disabled itemKey="disabled"> Disabled </CTab> </CTabList> <CTabContent> <CTabPanel className="p-3" itemKey="home"> Home tab content </CTabPanel> <CTabPanel className="p-3" itemKey="profile"> Profile tab content </CTabPanel> <CTabPanel className="p-3" itemKey="contact"> Contact tab content </CTabPanel> <CTabPanel className="p-3" itemKey="disabled"> Disabled tab content </CTabPanel> </CTabContent> </CTabs> </> ); };
This is version of package
"@coreui/coreui": "^5.3.2", "@coreui/react": "^5.5.0",
https://stackblitz.com/edit/react-b6qyor97?file=src%2FTabsControlledExample.jsx
The text was updated successfully, but these errors were encountered:
@nighttiger1990 please update @coreui/react to 5.6.0
@coreui/react
Sorry, something went wrong.
After updating to @coreui/react:5.6.0 issue gone. Thanks
@coreui/react:5.6.0
No branches or pull requests
In the below code. I change
activeTab
by clicking other button but Tabs not changeThis is version of package
https://stackblitz.com/edit/react-b6qyor97?file=src%2FTabsControlledExample.jsx
The text was updated successfully, but these errors were encountered: