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

Skip to content

Commit 08ae76a

Browse files
Merge pull request #1809 from iamfaran/fix/1087-tabbed
[Fix]: #1087 prevent deleting when only 1 Tab
2 parents 1cdaccb + b2b282f commit 08ae76a

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)