Replies: 2 comments 1 reply
-
Hey @eudago, recursive blocks aren't a thing in Payload for now, but you can try this workaround https://discord.com/channels/967097582721572934/967097582721572937/1293653995298099292 |
Beta Was this translation helpful? Give feedback.
1 reply
-
To provide a bit more context, the use case would be for a web builder. We could have a grid block and a card block. In this case, within the grid, we want to place block components, and in turn, within the card component, we want to embed the grid |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
I want to create a block (named BlockA) that can be used to wrap other blocks (BlockB), and the BlockB can have the BlockA as a child.
But I'm facing a circular dependency issue, the error is
I expect to resolve this by using dynamic imports to avoid the circular dependency issue, like this.
However, blocks don't accept a promise. How can I resolve this? Is it possible to use blocks recursively?
Link to the code that reproduces this issue
.
Reproduction Steps
Create a two blocks with circular relationships between each other
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Payload: 3.0.0-beta.28
Nextjs: 14.3.0-canary.21
Beta Was this translation helpful? Give feedback.
All reactions