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

Feature/216/destroy param #346

Merged
merged 2 commits into from
Feb 22, 2016

Conversation

radiolips
Copy link
Member

radiolips added a commit that referenced this pull request Feb 22, 2016
@radiolips radiolips merged commit b67ac87 into gridstack:master Feb 22, 2016
@radiolips radiolips deleted the feature/216/destroy-param branch February 22, 2016 14:44
$(window).off('resize', this.onResizeHandler);
this.disable();
this.container.remove();
if (typeof detachGrid != 'undefined' && !detachGrid) {
this.removeAll(true);

Choose a reason for hiding this comment

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

Shouldn't this be false? Otherwise, when detachGrid === false, we won't remove the grid container, but we will remove all of the widgets.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're absolutely correct. This should be this.removeAll(false). We're in the process of adding in unit tests, and clearly have not added this yet. Apologies for the mixup - I'll fix this and have it pushed out momentarily. Thanks for finding and reporting this bug - saved someone lots of frustration down the road. I hope this didn't cause you much issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

This has been updated. Thank you again for finding this!

Choose a reason for hiding this comment

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

Sweet! Thanks for the quick turnaround.

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.

3 participants