Skip to content

Conversation

@adumesny
Copy link
Member

@adumesny adumesny commented Jul 9, 2023

fix #2384

@adumesny adumesny merged commit 3aeef45 into gridstack:master Jul 9, 2023
let sub = el.querySelector('.grid-stack-item-content');
if (sub && sub.innerHTML !== w.content) {
sub.innerHTML = w.content;
let toRemove = el.querySelectorAll('.grid-stack-item-content > :not(.grid-stack-nested, style)');
Copy link
Member Author

@adumesny adumesny Jul 9, 2023

Choose a reason for hiding this comment

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

Note: this doesn't work if you have content='foo' instead of content='<div>foo</div>' as in your jsfiddle example

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

Successfully merging this pull request may close these issues.

Nested grid removed from Widget when updating contents

2 participants