File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export class DashRowCtrl {
34
34
title : config . new_panel_title ,
35
35
type : panelId ,
36
36
id : this . dashboard . getNextPanelId ( ) ,
37
+ isNew : true ,
37
38
} ,
38
39
} ;
39
40
} else {
@@ -63,7 +64,7 @@ export class DashRowCtrl {
63
64
this . row . panels . push ( dragObject . panel ) ;
64
65
65
66
// if not new remove from source row
66
- if ( ! dragObject . isNew ) {
67
+ if ( ! dragObject . panel . isNew ) {
67
68
dragObject . row . removePanel ( dragObject . panel , false ) ;
68
69
}
69
70
}
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ export class PanelCtrl {
54
54
this . events . emit ( 'panel-teardown' ) ;
55
55
this . events . removeAllListeners ( ) ;
56
56
} ) ;
57
+
58
+ // we should do something interesting
59
+ // with newly added panels
60
+ if ( this . panel . isNew ) {
61
+ delete this . panel . isNew ;
62
+ }
57
63
}
58
64
59
65
init ( ) {
You can’t perform that action at this time.
0 commit comments