mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +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(() => {
|
useEffect(() => {
|
||||||
const exposedVariables = {
|
const exposedVariables = {
|
||||||
setTab: async function (id) {
|
setTab: async function (id) {
|
||||||
if (id) {
|
if (id !== undefined) {
|
||||||
setCurrentTab(id);
|
const tabId = Number(id);
|
||||||
setExposedVariable('currentTab', id);
|
setCurrentTab(tabId);
|
||||||
fireEvent('onTabSwitch');
|
setExposedVariable('currentTab', tabId);
|
||||||
|
fireEvent('onTabSwitch')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
currentTab: currentTab,
|
currentTab: currentTab,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue