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

BUG: Wrapper component breaks when property is changed after deleting child section #385

Open
3 tasks done
akzhysparrow opened this issue Sep 30, 2024 · 1 comment
Open
3 tasks done

Comments

@akzhysparrow
Copy link

akzhysparrow commented Sep 30, 2024

GrapesJS version

  • I confirm to use the latest version of GrapesJS

GrapesJS MJML version

  • I confirm to use the latest version of GrapesJS MJML

What browser are you using?

Brave Version 1.70.119 Chromium: 129.0.6668.70

Reproducible demo link

https://grapesjs.com/demo-mjml

Describe the bug

How to reproduce the bug?

  1. Go to the demo mjml page https://grapesjs.com/demo-mjml
  2. Drag and drop a wrapper component
  3. Delete one section from within the wrapper
  4. Select the wrapper and change any of its properties

What is the expected behavior?

The property change should be reflected without affecting the child components

What is the current behavior?

All the child elements inside the wrapper disappears

Screen.Recording.2024-09-30.at.2.25.01.PM.mp4

Code of Conduct

  • I agree to follow this project's Code of Conduct
@akzhysparrow
Copy link
Author

It looks like the issue is due to appendChildren param of renderChildren being truthy. Overriding the rerender method in Wrapper.ts seems to fix it.

Wrapper.ts

rerender() {
  this.render(null, null, {}, false);
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant