File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ Change log
92
92
## 8.2.0-dev (TBD)
93
93
* fix: make sure ` removeNode() ` uses internal _ id (unique) and not node itself (since we clone those often)
94
94
* fix: after calling ` addRemoveCB ` make sure we don't makeWidget() (incorrectly) a second time
95
+ * break: ` GridStackWidget.id ` is now string only (used to be numberOrString) as it causes usage to have to check and cast
95
96
96
97
## 8.2.0 (2023-05-24)
97
98
* feat: ` makeWidget() ` now take optional ` GridStackWidget ` for sizing
Original file line number Diff line number Diff line change @@ -682,7 +682,7 @@ export class GridStack {
682
682
683
683
// now add/update the widgets
684
684
items . forEach ( w => {
685
- let item = ( w . id || w . id === 0 ) ? this . engine . nodes . find ( n => n . id === w . id ) : undefined ;
685
+ let item = ( w . id !== undefined ) ? this . engine . nodes . find ( n => n . id === w . id ) : undefined ;
686
686
if ( item ) {
687
687
this . update ( item . el , w ) ;
688
688
if ( w . subGridOpts ?. children ) { // update any sub grid as well
Original file line number Diff line number Diff line change @@ -163,9 +163,6 @@ export interface GridStackOptions {
163
163
/** draggable handle class (e.g. 'grid-stack-item-content'). If set 'handle' is ignored (default?: null) */
164
164
handleClass ?: string ;
165
165
166
- /** id used to debug grid instance, not currently stored in DOM attributes */
167
- id ?: numberOrString ;
168
-
169
166
/** additional widget class (default?: 'grid-stack-item') */
170
167
itemClass ?: string ;
171
168
@@ -309,7 +306,7 @@ export interface GridStackWidget extends GridStackPosition {
309
306
/** prevents being moved by others during their (default?: undefined = un-constrained) */
310
307
locked ?: boolean ;
311
308
/** value for `gs-id` stored on the widget (default?: undefined) */
312
- id ?: numberOrString ;
309
+ id ?: string ;
313
310
/** html to append inside as content */
314
311
content ?: string ;
315
312
/** optional nested grid options and list of children, which then turns into actual instance at runtime to get options from */
You can’t perform that action at this time.
0 commit comments