From b2b282f5e6a4540bc42696d39fcf0da775803071 Mon Sep 17 00:00:00 2001 From: FARAN Date: Wed, 25 Jun 2025 19:07:15 +0500 Subject: [PATCH] [Fix]: #1087 prevent deleting when only 1 Tab --- .../lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx index 73fa06c0d..86124c921 100644 --- a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx @@ -407,7 +407,8 @@ class TabbedContainerImplComp extends TabbedContainerBaseComp implements IContai }, } as CompAction; } - if (value.type === "delete" && this.children.tabs.getView().length <= 1) { + const { path } = action; + if (value.type === "delete" && path[0] === 'tabs' && this.children.tabs.getView().length <= 1) { messageInstance.warning(trans("tabbedContainer.atLeastOneTabError")); // at least one tab return this;