Skip to content

Commit 169da5c

Browse files
authored
fix: list drawer relationship not displaying (#9011)
List drawer relationships are not showing when selecting an existing upload. Before: ![image](https://github.com/user-attachments/assets/77c68572-31d2-47f9-b754-82808cf3f01c) After: ![Screenshot 2024-11-04 093830](https://github.com/user-attachments/assets/59f41ee0-f3de-431d-b432-e6181b5736a8)
1 parent 25932c0 commit 169da5c

File tree

1 file changed

+5
-0
lines changed
  • packages/payload/src/admin/components/views/collections/List/Cell/field-types/Relationship

1 file changed

+5
-0
lines changed

packages/payload/src/admin/components/views/collections/List/Cell/field-types/Relationship/index.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ const RelationshipCell: React.FC<CellComponentProps<RelationshipField | UploadFi
4848
relationTo: field.relationTo,
4949
value: cell,
5050
})
51+
} else if (typeof cell.id !== 'undefined' && typeof field.relationTo === 'string') {
52+
formattedValues.push({
53+
relationTo: field.relationTo,
54+
value: cell.id,
55+
})
5156
}
5257
})
5358
getRelationships(formattedValues)

0 commit comments

Comments
 (0)