fix undefined 1:N dropdown selection

This commit is contained in:
Martin McKeaveney 2021-02-24 19:05:17 +00:00
parent 5a6306f49f
commit 2a3e4d8a42
1 changed files with 1 additions and 1 deletions

View File

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