Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 07081b8

Browse files
authored
Merge pull request gridstack#1787 from adumesny/master
fix removeable:true by itself now works
2 parents 2b26d5f + 7c25469 commit 07081b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8+
- [4.2.5-dev (TBD)](#425-dev-tbd)
89
- [4.2.5 (2021-5-31)](#425-2021-5-31)
910
- [4.2.4 (2021-5-29)](#424-2021-5-29)
1011
- [4.2.3 (2021-5-8)](#423-2021-5-8)
@@ -58,6 +59,10 @@ Change log
5859
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)
5960

6061
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
62+
## 4.2.5-dev (TBD)
63+
64+
* fix [#1784](https://github.com/gridstack/gridstack.js/issues/1784) `removable:true` working by itself (without needing `acceptWidgets:true`)
65+
6166
## 4.2.5 (2021-5-31)
6267

6368
* fix for website with JQ `droppable('destroy')` giving error

src/gridstack-dd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export abstract class GridStackDD extends GridStackDDI {
7676
GridStack.prototype._setupAcceptWidget = function(this: GridStack): GridStack {
7777

7878
// check if we need to disable things
79-
if (this.opts.staticGrid || !this.opts.acceptWidgets) {
79+
if (this.opts.staticGrid || (!this.opts.acceptWidgets && !this.opts.removable)) {
8080
GridStackDD.get().droppable(this.el, 'destroy');
8181
return this;
8282
}

0 commit comments

Comments
 (0)