Skip to content

Commit b1fab08

Browse files
committed
modified the parentMultiselect file to allow users to search for component and have component appear in dropdown upon selection
1 parent f1d00db commit b1fab08

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/components/ParentMultiselect.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
<div id="parent-select">
33
<br />
44
<multiselect
5+
v-model="value"
56
placeholder="Parent Component"
67
:multiple="false"
78
:close-on-select="true"
89
:options="options"
910
@input="handleSelect"
1011
:max-height="150"
1112
:option-height="20"
12-
:searchable="false"
13+
:searchable="true"
1314
></multiselect>
1415
</div>
1516
</template>
@@ -23,6 +24,9 @@ export default {
2324
components: {
2425
Multiselect
2526
},
27+
data () {
28+
return { value: '' }
29+
},
2630
computed: {
2731
...mapState([
2832
'routes',
@@ -46,6 +50,14 @@ export default {
4650
// Set parentSelected to true IF VALUE IS A VALID PARENT (not null)
4751
this.parentSelected(true)
4852
}
53+
},
54+
watch: {
55+
componentMap: {
56+
handler () {
57+
// console.log('activeComponent has changed')
58+
this.value = ''
59+
}
60+
}
4961
}
5062
}
5163
</script>

0 commit comments

Comments
 (0)