Skip to content

Conversation

akhrarovsaid
Copy link
Contributor

@akhrarovsaid akhrarovsaid commented Jun 25, 2025

What?

This PR fixes an issue where the bottom "Create new ..." button would cause a runtime error due to not accounting for a polymorphic join setup.

Why?

To prevent a runtime error and allow users the ability to add new documents to the join as expected even in a polymorphic setup.

How?

Creation of a new AddNewButton which handles all of the add new button instances in the RelationshipTable component.

Addresses #12913 (comment)

Before:

join-polymorphic-runtime-error--Payload.webm

After:

polymorphic-after-Editing---Multiple-Collections-Parent---Payload.1.webm

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@DanRibbens DanRibbens merged commit a1822d2 into payloadcms:main Jun 27, 2025
150 of 152 checks passed
@akhrarovsaid akhrarovsaid deleted the fix/joins-add-new-button branch June 27, 2025 12:10
Copy link
Contributor

🚀 This is included in version v3.44.0

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.

None yet

2 participants