fix undefined 1:N dropdown selection

This commit is contained in:
Martin McKeaveney 2021-02-24 19:05:17 +00:00
parent 73b6995a57
commit 4223078a68
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@
if (fieldSchema?.relationshipType === "one-to-many") {
if (value?.length && options?.length) {
const row = options.find(row => row._id === value[0])
return row.name
return getDisplayName(row)
} else {
return placeholder || "Choose an option"
}