fix: fix Select field preview (#4507)

* fix: fix Select field preview

Closes #4084

* fix: fix field preview utils tests
This commit is contained in:
Thaïs
2024-03-25 16:37:41 +01:00
committed by GitHub
parent 2ae59a801f
commit 61e5d5bcb9
8 changed files with 33 additions and 17 deletions

View File

@ -55,11 +55,13 @@ export const useFieldPreview = ({
})
: null;
const selectOptionValues = selectOptions?.map((option) => option.value);
const isValueFromFirstRecord =
firstRecord &&
!isFieldValueEmpty({
fieldDefinition: { type: fieldMetadataItem.type },
fieldValue: fieldPreviewValueFromFirstRecord,
selectOptionValues,
});
const { records: relationRecords } = useFindManyRecords({