@@ -39,7 +39,7 @@ Description:
3939 :multiple =" false"
4040 :close-on-select =" true"
4141 :options =" childOptions"
42- @input =" handleAddChild"
42+ @select =" handleAddChild"
4343 :max-height =" 90"
4444 :option-height =" 20"
4545 :searchable =" false"
@@ -130,7 +130,7 @@ Description:
130130 :close-on-select =" true"
131131 :max-height =" 90"
132132 :option-height =" 20"
133- @input =" handleSelect(value) "
133+ @select =" handleSelect"
134134 placeholder =" Select/Search component"
135135 >
136136 <span slot =" noResult" >No components found.</span >
@@ -150,6 +150,7 @@ import Icons from "../Icons.vue";
150150import AddProps from " ./AddProps.vue" ;
151151import ComponentState from " ./ComponentState.vue" ;
152152import ComponentActions from " ./ComponentActions.vue" ;
153+ const cloneDeep = require (" lodash.clonedeep" );
153154
154155export default {
155156 data () {
@@ -189,7 +190,8 @@ export default {
189190 },
190191
191192 activeComponentData () {
192- return this .activeComponentObj ;
193+ return cloneDeep (this .activeComponentObj );
194+ // return this.activeComponentObj;
193195 },
194196
195197 // returns options for component multiselect
@@ -251,8 +253,9 @@ export default {
251253 ]),
252254
253255 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);
256259 },
257260
258261 // delete selected state from active component
@@ -274,8 +277,11 @@ export default {
274277 // },
275278 // Set component as active component from left side dropdown
276279 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+ }
279285 },
280286 //
281287 // deleteCircumvent (e) {
@@ -306,6 +312,7 @@ export default {
306312
307313 // Select active component from multi-select input
308314 handleSelect (componentName ) {
315+ console .log (' handleSelect ' + componentName)
309316 this .setActiveComponent (componentName);
310317 this .value = " " ;
311318 this .activeComponentData .isActive = true ;
0 commit comments