Skip to content

Custom block is going into infinite loop when updateBlockAttributes or replaceInnerBlocks is used to modify the Inner blocks. #61664

Open
@SH4LIN

Description

Description

I have created a custom tabs block which uses the updateBlockAttributes and replaceInnerBlocks to update the attributes of each inner block (Tab).

When the tabs block is added on the page and I try to swap the template, the preview is going into the Infinite loop and causes react #185 error.

Step-by-step reproduction instructions

  1. Create a custom block which uses InnerBlocks.
  2. Use the updateBlockAttributes or replaceInnerBlocks function to modify the inner blocks of that custom block.
  3. Open the Swap Template modal.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

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

Metadata

Assignees

No one assigned

    Labels

    [Status] Needs More InfoFollow-up required in order to be actionable.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions