Tabs onActive callback called twice for each action
See original GitHub issueIf you go to online playground https://operational-ui.netlify.com/#/Components/Tabs and change code like this:
- <Tabs tabs={tabs} active={active} onActivate={setActive} onClose={onClose} onInsert={onInsert}>
+ <Tabs tabs={tabs} active={active} onActivate={(x) => { console.log(`onActivate ${x}`); setActive(x);} } onClose={onClose} onInsert={onInsert}>
And then click any tab you will see it is called twice
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Tabs callback fires twice on second click · Issue #6009 - GitHub
Having an odd issue where the tabs callback fires twice, on every instance after the first instance of clicking any of the tabs:....
Read more >Bootstrap 3 jquery event for active tab change - Stack Overflow
the problem is that attr('href') is never empty. Or to compare the #id = "#some value" and then call the ajax. Share.
Read more >Lightning Tabset tab change callback (LWC)
The Tab Component have an active Event which is fired everytime their content gets activated.
Read more >Tabs API - Material UI - MUI
Name Type Default
action ref
allowScrollButtonsMobile bool false
aria‑label string
Read more >Tabs - Chakra UI
import { Tabs, TabList, TabPanels, Tab, TabPanel } from '@chakra-ui/react'. copy. Tabs: Provides context and state for all components; TabList: Wrapper for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@stereobooster I’ll try it now 😃
My guess the issue is here
We don’t need to track focus at all. We only need to react on keyboard and clicks