relationship
relationship<
TFieldMeta,TCollectionSlug>(options):RelationshipField<TFieldMeta,TCollectionSlug>
Defined in: packages/react/src/index.ts:209
Defines a relationship field with React-typed component slots.
Drop-in replacement for @vexcms/core’s relationship — same behaviour,
but options.admin.components.preview is typed as a React ComponentType.
Type Parameters
Section titled “Type Parameters”TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends object = { }
TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string = string
Parameters
Section titled “Parameters”options
Section titled “options”RelationshipFieldInput<TFieldMeta, TCollectionSlug>
Relationship field configuration.
Returns
Section titled “Returns”RelationshipField<TFieldMeta, TCollectionSlug>
The resolved relationship field definition.