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 b7ca62c28..b3b71c560 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -60,12 +60,12 @@ const PreviewCom = (props) => { const children = collection.fields .filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type)) ?.map((v) => { - return { value: v.name, key: v.name, label: t(v.uiSchema?.title) }; + return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) }; }) .concat(result); data.push({ value: item, - label: t(collection.title), + label: t(collection.title || collection.name), children, }); }); @@ -187,7 +187,7 @@ const PreviewCom = (props) => { {data.map((group) => ( {group.children.map((item) => ( - + {compile(item.label)} ))}