Skip to content

Commit cee3217

Browse files
committed
fixed functionality
1 parent 1f51fd6 commit cee3217

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/HomeSideDropDownItems/ComponentList.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:close-on-select="false"
99
:max-height="150"
1010
:option-height="20"
11-
@input="onActivated(value)"
11+
@input="handleSelect(value)"
1212
placeholder="Select a component"></multiselect>
1313
<br/>
1414
<a
@@ -74,17 +74,17 @@ export default {
7474
'deleteActiveComponent'
7575
]),
7676
onActivated (componentData) {
77-
if (!componentData.componentName) {
78-
this.setActiveComponent(componentData)
79-
this.value = ''
80-
} else {
81-
this.setActiveComponent(componentData.componentName)
82-
}
77+
this.setActiveComponent(componentData.componentName)
8378
this.activeComponentData.isActive = true
8479
},
8580
handleClick (componentData) {
8681
this.setActiveComponent(componentData.componentName)
8782
this.deleteActiveComponent(componentData.componentName)
83+
},
84+
handleSelect (componentName) {
85+
this.setActiveComponent(componentName)
86+
this.value = ''
87+
this.activeComponentData.isActive = true
8888
}
8989
}
9090
}

0 commit comments

Comments
 (0)