mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:46:45 +00:00
refactor: remove search box when adding block to page (#5577)
* refactor: remove search box when adding block to page * fix: bug
This commit is contained in:
parent
d1ca04ddc7
commit
2f1a9100a0
@ -44,9 +44,14 @@ export const SchemaInitializerItemGroup: FC<SchemaInitializerItemGroupProps> = (
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const SchemaInitializerItemGroupInternal = () => {
|
export const SchemaInitializerItemGroupInternal = () => {
|
||||||
const itemConfig: any = useSchemaInitializerItem<SchemaInitializerItemGroupProps>();
|
const itemConfig: any = useSchemaInitializerItem<SchemaInitializerItemGroupProps>();
|
||||||
|
|
||||||
const searchedChildren = useMenuSearch(itemConfig);
|
const searchedChildren = useMenuSearch(itemConfig);
|
||||||
|
if (itemConfig.name !== 'displayFields') {
|
||||||
|
return <SchemaInitializerItemGroup {...itemConfig} />;
|
||||||
|
}
|
||||||
/* eslint-disable react/no-children-prop */
|
/* eslint-disable react/no-children-prop */
|
||||||
return <SchemaInitializerItemGroup {...itemConfig} children={searchedChildren} />;
|
return <SchemaInitializerItemGroup {...itemConfig} children={searchedChildren} />;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user