Skip to content

Commit d131394

Browse files
authored
Merge pull request #11 from JojuOlaode/createComponentDropDown
Create component drop down
2 parents f6d4c44 + 83655a7 commit d131394

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',
@@ -47,6 +51,14 @@ export default {
4751
// Set parentSelected to true IF VALUE IS A VALID PARENT (not null)
4852
this.parentSelected(value)
4953
}
54+
},
55+
watch: {
56+
componentMap: {
57+
handler () {
58+
// console.log('activeComponent has changed')
59+
this.value = ''
60+
}
61+
}
5062
}
5163
}
5264
</script>

0 commit comments

Comments
 (0)