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
9292## 8.2.0-dev (TBD)
9393* fix: make sure ` removeNode() ` uses internal _ id (unique) and not node itself (since we clone those often)
9494* 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
9596
9697## 8.2.0 (2023-05-24)
9798* 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 {
682682
683683 // now add/update the widgets
684684 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 ;
686686 if ( item ) {
687687 this . update ( item . el , w ) ;
688688 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 {
163163 /** draggable handle class (e.g. 'grid-stack-item-content'). If set 'handle' is ignored (default?: null) */
164164 handleClass ?: string ;
165165
166- /** id used to debug grid instance, not currently stored in DOM attributes */
167- id ?: numberOrString ;
168-
169166 /** additional widget class (default?: 'grid-stack-item') */
170167 itemClass ?: string ;
171168
@@ -309,7 +306,7 @@ export interface GridStackWidget extends GridStackPosition {
309306 /** prevents being moved by others during their (default?: undefined = un-constrained) */
310307 locked ?: boolean ;
311308 /** value for `gs-id` stored on the widget (default?: undefined) */
312- id ?: numberOrString ;
309+ id ?: string ;
313310 /** html to append inside as content */
314311 content ?: string ;
315312 /** 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