Skip to content

Customising the appearance of the Relationship field #2457

Answered by DanRibbens
RapidOwl asked this question in Q&A
Discussion options

You must be logged in to vote

I love that you are tenatiously getting after it, even if it is more than you can "chew as a beginner"!
You can start by copying the existing Default relationship component code into a new file in your project and make your own edits there. Then you will import and set that as your admin.components.Field for the relationship field(s) of your collection config.

Here is a link to the field component that Payload uses as a default: https://github.com/payloadcms/payload/blob/master/src/admin/components/forms/field-types/Relationship/index.tsx

Good luck and do ask followup questions if you get stuck!

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@RapidOwl
Comment options

@RapidOwl
Comment options

@RapidOwl
Comment options

@Oliver-Turp
Comment options

@RapidOwl
Comment options

Answer selected by RapidOwl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants