Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2b282f

Browse files
committed
[Fix]: #1087 prevent deleting when only 1 Tab
1 parent 18d3e40 commit b2b282f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ class TabbedContainerImplComp extends TabbedContainerBaseComp implements IContai
407407
},
408408
} as CompAction;
409409
}
410-
if (value.type === "delete" && this.children.tabs.getView().length <= 1) {
410+
const { path } = action;
411+
if (value.type === "delete" && path[0] === 'tabs' && this.children.tabs.getView().length <= 1) {
411412
messageInstance.warning(trans("tabbedContainer.atLeastOneTabError"));
412413
// at least one tab
413414
return this;

0 commit comments

Comments
 (0)