@@ -7,8 +7,8 @@ Description:
7
7
<template >
8
8
<div id =" parent-select" >
9
9
<br />
10
- <!-- <multiselect
11
- v-model="value "
10
+ <VueMultiselect
11
+ v-model =" selected "
12
12
placeholder =" Parent Component"
13
13
:multiple =" false"
14
14
:close-on-select =" true"
@@ -18,27 +18,27 @@ Description:
18
18
:max-height =" 90"
19
19
:option-height =" 20"
20
20
:searchable =" true"
21
- > -->
21
+ >
22
22
<!-- refactor slot syntax here -->
23
23
<!-- <span slot='noResult'>No components found.</span> -->
24
24
<span class =' noResult' >
25
25
<slot ></slot >
26
26
</span >
27
- <!-- </multiselect> -- >
27
+ </ VueMultiselect >
28
28
</div >
29
29
</template >
30
30
31
31
<script >
32
32
import { mapState , mapActions } from ' vuex'
33
- // import Multiselect from 'vue-multiselect'
33
+ import VueMultiselect from ' vue-multiselect'
34
34
35
35
export default {
36
36
name: ' ParentMultiselect' ,
37
37
components: {
38
- Multiselect
38
+ VueMultiselect
39
39
},
40
40
data () {
41
- return { value : ' ' }
41
+ return { selected : ' ' }
42
42
},
43
43
computed: {
44
44
... mapState ([
@@ -54,8 +54,8 @@ export default {
54
54
},
55
55
methods: {
56
56
... mapActions ([' parentSelected' , ' setActiveComponent' ]),
57
- selectParent (value ) {
58
- this .parentSelected (value )
57
+ selectParent (selected ) {
58
+ this .parentSelected (selected )
59
59
},
60
60
// when multiselect is opened activeComponent is deselected to allow for parentSelected action
61
61
resetActiveComponent () {
@@ -64,19 +64,19 @@ export default {
64
64
}
65
65
}
66
66
},
67
- // clears out value in mutiselect on creation of component
67
+ // clears out selected in mutiselect on creation of component
68
68
watch: {
69
69
componentMap: {
70
70
handler () {
71
71
// console.log('componentMap has changed')
72
- this .value = ' '
72
+ this .selected = ' '
73
73
}
74
74
}
75
75
}
76
76
}
77
77
</script >
78
78
79
- <style src="vue-multiselect/dist/vue-multiselect.min . css "></style >
79
+ <style src="vue-multiselect/dist/vue-multiselect.css "></style >
80
80
<style scoped>
81
81
#parent-select {
82
82
height : 30px ;
0 commit comments