Update Tabs.jsx

This commit is contained in:
Jeffin joffy 2024-07-14 13:26:44 +05:30
parent 07e0c0a297
commit da3495a87f

View file

@ -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,