Complete labelIdentifer, relationPicker first implementation (#2618)

* Fix first column main identifier

* Fixes
This commit is contained in:
Charles Bochet
2023-11-21 18:32:36 +01:00
committed by GitHub
parent dd125ddfcc
commit 726e375616
27 changed files with 165 additions and 91 deletions

View File

@ -26,7 +26,10 @@ export const useFieldPreview = ({
const fieldName = fieldMetadata.id
? objectMetadataItem?.fields.find(({ id }) => id === fieldMetadata.id)?.name
: undefined;
const value = fieldName ? firstRecord?.[fieldName] : undefined;
const value =
fieldMetadata.type !== 'RELATION' && fieldName
? firstRecord?.[fieldName]
: undefined;
return {
entityId: firstRecord?.id || `${objectMetadataId}-no-records`,