mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Update Tabs.jsx
This commit is contained in:
parent
07e0c0a297
commit
da3495a87f
1 changed files with 5 additions and 4 deletions
|
|
@ -95,10 +95,11 @@ export const Tabs = function Tabs({
|
|||
useEffect(() => {
|
||||
const exposedVariables = {
|
||||
setTab: async function (id) {
|
||||
if (id) {
|
||||
setCurrentTab(id);
|
||||
setExposedVariable('currentTab', id);
|
||||
fireEvent('onTabSwitch');
|
||||
if (id !== undefined) {
|
||||
const tabId = Number(id);
|
||||
setCurrentTab(tabId);
|
||||
setExposedVariable('currentTab', tabId);
|
||||
fireEvent('onTabSwitch')
|
||||
}
|
||||
},
|
||||
currentTab: currentTab,
|
||||
|
|
|
|||
Loading…
Reference in a new issue