Skip to content

Conversation

@rilrom
Copy link
Contributor

@rilrom rilrom commented Dec 6, 2025

What?

Currently when you use the create button in a relationship field that has more than one collection in its relationTo and a collection that isn't first in the list is selected, the selected value in the field will always be pointing to the first collection in the list, causing incorrect results or validation errors.

Why?

The selected value in the field should be applied to the collection the user has selected, not just the first collection in the relationTo array.

How?

Use the selected collection in the onChange handler instead of relatedCollections[0].

Fixes: #14728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LinkFeature always saves relationTo as first collection when creating a doc

1 participant