From 2f1a9100a03ab93b1075d009caffa0dfc06ed9d7 Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 5 Nov 2024 10:11:00 +0800 Subject: [PATCH] refactor: remove search box when adding block to page (#5577) * refactor: remove search box when adding block to page * fix: bug --- .../components/SchemaInitializerItemGroup.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/client/src/application/schema-initializer/components/SchemaInitializerItemGroup.tsx b/packages/core/client/src/application/schema-initializer/components/SchemaInitializerItemGroup.tsx index 2163255598..5a9baacc20 100644 --- a/packages/core/client/src/application/schema-initializer/components/SchemaInitializerItemGroup.tsx +++ b/packages/core/client/src/application/schema-initializer/components/SchemaInitializerItemGroup.tsx @@ -44,9 +44,14 @@ export const SchemaInitializerItemGroup: FC = ( /** * @internal */ + export const SchemaInitializerItemGroupInternal = () => { const itemConfig: any = useSchemaInitializerItem(); + const searchedChildren = useMenuSearch(itemConfig); + if (itemConfig.name !== 'displayFields') { + return ; + } /* eslint-disable react/no-children-prop */ return ; };