From de4beb57a064aac3e452126eff4fb9a7777e42ce Mon Sep 17 00:00:00 2001
From: katherinehhh <shunai.tang@hand-china.com>
Date: Tue, 28 Mar 2023 23:58:21 +0800
Subject: [PATCH] fix: enable child collections remain after deleting a child
 collection (#1610)

---
 .../client/src/schema-settings/EnableChildCollections/index.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/core/client/src/schema-settings/EnableChildCollections/index.tsx b/packages/core/client/src/schema-settings/EnableChildCollections/index.tsx
index 58e7eebea..4642903ac 100644
--- a/packages/core/client/src/schema-settings/EnableChildCollections/index.tsx
+++ b/packages/core/client/src/schema-settings/EnableChildCollections/index.tsx
@@ -44,7 +44,7 @@ export const EnableChildCollections = observer((props: any) => {
         properties: {
           childrenCollections: {
             type: 'array',
-            default: defaultValues,
+            default: defaultValues.filter((v) => childrenCollections.find((k) => k.name === v.collection)),
             'x-component': 'ArrayItems',
             'x-decorator': 'FormItem',
             items: {