Skip to content

Commit 999623b

Browse files
committed
fixed disappearing component on all search fields if component is active
1 parent 2f42840 commit 999623b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/components/HomeSideDropDownItems/ComponentList.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<template>
22
<div class="home-sidebar">
33
<multiselect
4-
class='multiselect'
5-
v-model="value"
6-
:options='options'
7-
:searchable="true"
4+
class='multiselect'
5+
v-model="value"
6+
:options='options'
7+
:searchable="true"
88
:close-on-select="true"
99
:max-height="90"
1010
:option-height="20"
1111
@input="handleSelect(value)"
12+
@open="resetActiveComponent"
1213
placeholder="Select a component">
1314
<span slot='noResult'>No components found.</span>
1415
</multiselect>
@@ -87,6 +88,11 @@ export default {
8788
this.setActiveComponent(componentName)
8889
this.value = ''
8990
this.activeComponentData.isActive = true
91+
},
92+
resetActiveComponent () {
93+
if (this.activeComponent !== '') {
94+
this.setActiveComponent('')
95+
}
9096
}
9197
}
9298
}

src/components/ParentMultiselect.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:close-on-select="true"
99
:options="options"
1010
@input="handleSelect"
11+
@open="resetActiveComponent"
1112
:max-height="90"
1213
:option-height="20"
1314
:searchable="true"

0 commit comments

Comments
 (0)