@@ -39,7 +39,7 @@ Description:
39
39
:multiple =" false"
40
40
:close-on-select =" true"
41
41
:options =" childOptions"
42
- @input =" handleAddChild"
42
+ @select =" handleAddChild"
43
43
:max-height =" 90"
44
44
:option-height =" 20"
45
45
:searchable =" false"
@@ -130,7 +130,7 @@ Description:
130
130
:close-on-select =" true"
131
131
:max-height =" 90"
132
132
:option-height =" 20"
133
- @input =" handleSelect(value) "
133
+ @select =" handleSelect"
134
134
placeholder =" Select/Search component"
135
135
>
136
136
<span slot =" noResult" >No components found.</span >
@@ -150,6 +150,7 @@ import Icons from "../Icons.vue";
150
150
import AddProps from " ./AddProps.vue" ;
151
151
import ComponentState from " ./ComponentState.vue" ;
152
152
import ComponentActions from " ./ComponentActions.vue" ;
153
+ const cloneDeep = require (" lodash.clonedeep" );
153
154
154
155
export default {
155
156
data () {
@@ -189,7 +190,8 @@ export default {
189
190
},
190
191
191
192
activeComponentData () {
192
- return this .activeComponentObj ;
193
+ return cloneDeep (this .activeComponentObj );
194
+ // return this.activeComponentObj;
193
195
},
194
196
195
197
// returns options for component multiselect
@@ -251,8 +253,9 @@ export default {
251
253
]),
252
254
253
255
handleAddChild (value ) {
254
- console .log (' selected child component: ' , value)
255
- this .updateActiveComponentChildrenValue (value);
256
+ const valueArray = [value];
257
+ this .updateActiveComponentChildrenValue (valueArray);
258
+ // this.updateActiveComponentChildrenValue(value);
256
259
},
257
260
258
261
// delete selected state from active component
@@ -274,8 +277,11 @@ export default {
274
277
// },
275
278
// Set component as active component from left side dropdown
276
279
onActivated (componentData ) {
277
- this .setActiveComponent (componentData .componentName );
278
- this .activeComponentData .isActive = true ;
280
+ if (componentData) {
281
+ this .setActiveComponent (componentData .componentName );
282
+ this .activeComponentData .isActive = true ;
283
+ console .log (' onActivated Triggered' )
284
+ }
279
285
},
280
286
//
281
287
// deleteCircumvent (e) {
@@ -306,6 +312,7 @@ export default {
306
312
307
313
// Select active component from multi-select input
308
314
handleSelect (componentName ) {
315
+ console .log (' handleSelect ' + componentName)
309
316
this .setActiveComponent (componentName);
310
317
this .value = " " ;
311
318
this .activeComponentData .isActive = true ;
0 commit comments