File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ <h1>Two grids demo</h1>
6666 let grids = GridStack . initAll ( options ) ;
6767 grids [ 1 ] . float ( false ) ;
6868
69- // new 4.x static method instead of setting up options on every grid (never been per grid really) but old options still works
69+ // new 4.x static method instead of setting up options on every grid (never been per grid really)
7070 GridStack . setupDragIn ( '.sidebar .grid-stack-item' , { appendTo : 'body' , helper : myClone } ) ;
7171 // GridStack.setupDragIn(); // second call will now work (cache last values)
7272
@@ -85,7 +85,9 @@ <h1>Two grids demo</h1>
8585
8686 // decide what the dropped item will be - for now just a clone but can be anything
8787 function myClone ( event ) {
88- return event . target . cloneNode ( true ) ;
88+ const el = event . target . cloneNode ( true ) ;
89+ el . setAttribute ( 'gs-id' , 'foo' ) ; // TEST why clone element is not used directly on drop #2231
90+ return el ;
8991 }
9092
9193 function toggleFloat ( button , i ) {
You can’t perform that action at this time.
0 commit comments