diff --git a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx index fa77da458f..e1098151e0 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -69,7 +69,7 @@ const PreviewCom = (props) => { }; }); const children = collection.fields - .filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type)) + .filter((v) => !['obo', 'oho', 'm2m', 'o2m'].includes(v?.interface)) ?.map((v) => { return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) }; }) diff --git a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx index 0935adfdf1..541dbcb89f 100644 --- a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx +++ b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx @@ -68,11 +68,12 @@ const useSourceFieldsOptions = () => { return; } const children = (collection.fields as FieldOptions[]) - .filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type)) + .filter((v) => { + return !['hasOne', 'hasMany', 'belongsToMany', 'belongsTo'].includes(v?.type); + }) ?.map((v) => { return { value: v.name, label: t(v.uiSchema?.title) }; }); - data.push({ value: item, label: t(collection.title), @@ -110,7 +111,6 @@ export const FieldsConfigure = observer( [compile], ); const sourceFieldsOptions = useSourceFieldsOptions(); - const refGetInterface = useRef(getInterface); useEffect(() => { const fieldsMp = new Map();