Fix preview on non-configured m2o

This commit is contained in:
rijkvanzanten
2020-11-03 13:58:42 -05:00
parent ee4f3df78a
commit 2b92f199be

View File

@@ -361,7 +361,7 @@ export default defineComponent({
function usePreview() {
const displayTemplate = computed(() => {
if (props.template !== null) return props.template;
return collectionInfo.value?.meta?.display_template || `{{ ${relatedPrimaryKeyField} }}`;
return collectionInfo.value?.meta?.display_template || `{{ ${relatedPrimaryKeyField.value.field} }}`;
});
const requiredFields = computed(() => {