You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* you can now specify children that will prevent item from being dragged when clicked on.
* fix for gridstack#2205
* updated demo to showcase custom non draggable item
Copy file name to clipboardExpand all lines: doc/CHANGES.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ Change log
89
89
* break: remove `GridStackOptions.minWidth` obsolete since 5.1, use `oneColumnSize` instead
90
90
* optimize: CSS files now even 25% smaller (after being halfed in 8.0.0) by removing `.grid-stack` prefix for anything already gs based, and 3 digit rounding.
* feat: [#2205](https://github.com/gridstack/gridstack.js/issues/2205) added `GridStackOptions.draggable.cancel` for list of selectors that should prevent item dragging
92
93
93
94
## 8.0.1 (2023-04-29)
94
95
* feat: [#2275](https://github.com/gridstack/gridstack.js/issues/2275)`setupDragIn()` now can take an array or elements (in addition to selector string) and optional parent root (for shadow DOM support)
Copy file name to clipboardExpand all lines: doc/README.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -131,9 +131,10 @@ GridStack will add it to the <style> elements it creates.
131
131
-`appendTo`?: string - default to 'body' (TODO: is this even used anymore ?)
132
132
-`pause`?: boolean | number - if set (true | msec), dragging placement (collision) will only happen after a pause by the user. Note: this is Global
133
133
-`scroll`?: boolean - default to 'true', enable or disable the scroll when an element is dragged on bottom or top of the grid.
134
+
-`cancel`?: string - prevents dragging from starting on specified elements, listed as comma separated selectors (eg: '.no-drag'). default built in is 'input,textarea,button,select,option'
134
135
135
136
### DDDragInOpt extends DDDragOpt
136
-
-`helper`?: string | ((event: Event) => HTMLElement) - helper function when dropping (ex: 'clone' or your own method)
137
+
-`helper`?: 'clone' | ((event: Event) => HTMLElement) - helper function when dropping (ex: 'clone' or your own method)
/** parent constraining where item can be dragged out from (default: null = no constrain) */
347
-
// containment?: string;
346
+
/** prevents dragging from starting on specified elements, listed as comma separated selectors (eg: '.no-drag'). default built in is 'input,textarea,button,select,option' */
347
+
cancel?: string;
348
348
}
349
349
exportinterfaceDDDragInOptextendsDDDragOpt{
350
-
/** helper function when dropping (ex: 'clone' or your own method) */
351
-
helper?: string|((event: Event)=>HTMLElement);
350
+
/** helper function when dropping: 'clone' or your own method */
351
+
helper?: 'clone'|((event: Event)=>HTMLElement);
352
352
/** used when dragging item from the outside, and canceling (ex: 'invalid' or your own method)*/
0 commit comments