1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

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

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"
}