diff --git a/packages/core/client/src/schema-settings/SchemaSettings.tsx b/packages/core/client/src/schema-settings/SchemaSettings.tsx index b32307f7e9..c6e3e0e9e9 100644 --- a/packages/core/client/src/schema-settings/SchemaSettings.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettings.tsx @@ -42,11 +42,11 @@ import { ActionContextProvider, AssociationOrCollectionProvider, CollectionFieldOptions_deprecated, + CollectionRecordProvider, DataSourceApplicationProvider, Designable, FormDialog, FormProvider, - CollectionRecordProvider, RemoteSchemaComponent, SchemaComponent, SchemaComponentContext, @@ -56,6 +56,7 @@ import { useAPIClient, useBlockRequestContext, useCollectionManager_deprecated, + useCollectionRecord, useCollection_deprecated, useCompile, useDataBlockProps, @@ -63,7 +64,6 @@ import { useFilterBlock, useGlobalTheme, useLinkageCollectionFilterOptions, - useCollectionRecord, useRecord, useSchemaSettingsItem, useSortFields, @@ -82,9 +82,9 @@ import { useFormActiveFields, } from '../block-provider/hooks'; import { SelectWithTitle, SelectWithTitleProps } from '../common/SelectWithTitle'; +import { useNiceDropdownMaxHeight } from '../common/useNiceDropdownHeight'; import { useDataSourceManager } from '../data-source/data-source/DataSourceManagerProvider'; import { useDataSourceKey } from '../data-source/data-source/DataSourceProvider'; -import { useNiceDropdownMaxHeight } from '../common/useNiceDropdownHeight'; import { FilterBlockType, getSupportFieldsByAssociation, @@ -572,7 +572,7 @@ export const SchemaSettingsRemove: FC = (props) => { field.required = false; fieldSchema['required'] = false; } - if (template && ctx?.dn) { + if (template && template.uid === fieldSchema['x-uid'] && ctx?.dn) { await ctx?.dn.remove(null, options); } else { await dn.remove(null, options);