File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ export default {
63
63
' addToComponentElementList'
64
64
]),
65
65
handleClick () {
66
+ if (! this .componentNameInputValue .trim ()) {
67
+ event .preventDefault ();
68
+ return false ;
69
+ }
66
70
const component = {
67
71
componentName: this .componentNameInputValue ,
68
72
x: 0 ,
@@ -75,6 +79,7 @@ export default {
75
79
}
76
80
77
81
this .registerComponent (component)
82
+
78
83
},
79
84
resetActiveComponent () {
80
85
this .setActiveComponent (' ' )
Original file line number Diff line number Diff line change @@ -88,15 +88,15 @@ export default {
88
88
// toggles footer to "html" tab if component name has value & elements are in queue
89
89
componentNameInputValue : function () {
90
90
// console.log('watching componentNameInputVal')
91
- if (this .componentNameInputValue !== ' ' && this .selectedElementList .length !== 0 ) {
92
- console .log (this .selectedElementList )
91
+ if (this .componentNameInputValue !== ' ' && this .selectedElementList .length !== 0 && this . activeComponent === ' ' ) {
92
+ // console.log(this.selectedElementList)
93
93
this .tab = ' html'
94
94
}
95
95
},
96
96
// toggles footer to "html" tab if elements are added to queue on component creation
97
97
selectedElementList : function () {
98
98
// console.log('watching selectedElementList')
99
- if (this .activeComponent === ' ' ) {
99
+ if (this .activeComponent === ' ' && this . selectedElementList . length !== 0 ) {
100
100
this .tab = ' html'
101
101
}
102
102
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export default {
62
62
},
63
63
watch: {
64
64
activeComponent : function () {
65
- console .log (' watching activeComponent in HomeQueue' );
65
+ // console.log('watching activeComponent in HomeQueue')
66
66
if (this .activeComponent !== ' ' ) {
67
67
this .component = true
68
68
} else {
You can’t perform that action at this time.
0 commit comments