Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): unique ids for nested rows on row duplicate to prevent errors with postgres #8790

Merged

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Oct 18, 2024

Fixes #8784

This works for any deep level, both arrays and blocks.

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.

It would be a quick e2e test to add considering we already have the config in place to support it.

In test/fields/e2e.spec.ts
Go to create block-fields
Duplicate the first block with sub blocks
Save and assert

This assumes we run e2e using postgres or SQLite which we don't currently in CI but we should reconsider that. For now running tests locally is good.

packages/ui/src/forms/Form/fieldReducer.ts Show resolved Hide resolved
@r1tsuu r1tsuu linked an issue Oct 19, 2024 that may be closed by this pull request
@DanRibbens DanRibbens merged commit fe25b54 into beta Oct 21, 2024
49 checks passed
@DanRibbens DanRibbens deleted the fix/duplicate-blocks-and-blocks-inside-of-blocks-duplicate branch October 21, 2024 12:51
r1tsuu added a commit that referenced this pull request Oct 21, 2024
…s with postgres (#8790)

Fixes #8784

This works for any deep level, both arrays and blocks.
Copy link

🚀 This is included in version v3.0.0-beta.117

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.

Duplicating blocks with blocks errors
2 participants