RelationshipPreviewProps
Defined in: packages/core/src/collections/types.ts:22
Props received by a custom preview component for relationship rendering.
TCollectionSlug is the slug of the doc being rendered. In a picker row, this is the
candidate target doc’s slug. In a list-table cell, this is the parent
collection’s slug (the table row’s row.original). In the trigger’s
selected-value chip, it is the resolved target doc’s slug.
fieldKey is the relationship field’s key on the parent collection (e.g.
"author"). In picker rows the component may ignore it; in list cells it
gives access to the IDs via doc[fieldKey].
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends CollectionSlug = CollectionSlug
The slug of the doc being rendered.
Properties
Section titled “Properties”config
Section titled “config”config:
CollectionConfig<TCollectionSlug>
Defined in: packages/core/src/collections/types.ts:28
The resolved collection config matching doc.
doc:
TDocument
Defined in: packages/core/src/collections/types.ts:24
The document being previewed.
fieldKey
Section titled “fieldKey”fieldKey:
string
Defined in: packages/core/src/collections/types.ts:26
The relationship field key on the parent collection.