mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fix/tab-switch-event (#10455)
This commit is contained in:
parent
67d8dfcb9a
commit
d92f30f984
1 changed files with 2 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ export const Tabs = function Tabs({
|
|||
useEffect(() => {
|
||||
const exposedVariables = {
|
||||
setTab: async function (id) {
|
||||
if (id) {
|
||||
if (id && currentTab !== id) {
|
||||
setCurrentTab(id);
|
||||
setExposedVariable('currentTab', id);
|
||||
fireEvent('onTabSwitch');
|
||||
|
|
@ -162,6 +162,7 @@ export const Tabs = function Tabs({
|
|||
className="nav-item"
|
||||
style={{ opacity: tab?.disabled && '0.5', width: tabWidth == 'split' && '33.3%' }}
|
||||
onClick={() => {
|
||||
if (currentTab === tab.id) return;
|
||||
setTabSwitchingOnProgress(true);
|
||||
|
||||
!tab?.disabled && setCurrentTab(tab.id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue