@@ -7,8 +7,8 @@ Description:
77<template >
88 <div id =" parent-select" >
99 <br />
10- <!-- <multiselect
11- v-model="value "
10+ <VueMultiselect
11+ v-model =" selected "
1212 placeholder =" Parent Component"
1313 :multiple =" false"
1414 :close-on-select =" true"
@@ -18,27 +18,27 @@ Description:
1818 :max-height =" 90"
1919 :option-height =" 20"
2020 :searchable =" true"
21- > -->
21+ >
2222 <!-- refactor slot syntax here -->
2323 <!-- <span slot='noResult'>No components found.</span> -->
2424 <span class =' noResult' >
2525 <slot ></slot >
2626 </span >
27- <!-- </multiselect> -- >
27+ </ VueMultiselect >
2828 </div >
2929</template >
3030
3131<script >
3232import { mapState , mapActions } from ' vuex'
33- // import Multiselect from 'vue-multiselect'
33+ import VueMultiselect from ' vue-multiselect'
3434
3535export default {
3636 name: ' ParentMultiselect' ,
3737 components: {
38- Multiselect
38+ VueMultiselect
3939 },
4040 data () {
41- return { value : ' ' }
41+ return { selected : ' ' }
4242 },
4343 computed: {
4444 ... mapState ([
@@ -54,8 +54,8 @@ export default {
5454 },
5555 methods: {
5656 ... mapActions ([' parentSelected' , ' setActiveComponent' ]),
57- selectParent (value ) {
58- this .parentSelected (value )
57+ selectParent (selected ) {
58+ this .parentSelected (selected )
5959 },
6060 // when multiselect is opened activeComponent is deselected to allow for parentSelected action
6161 resetActiveComponent () {
@@ -64,19 +64,19 @@ export default {
6464 }
6565 }
6666 },
67- // clears out value in mutiselect on creation of component
67+ // clears out selected in mutiselect on creation of component
6868 watch: {
6969 componentMap: {
7070 handler () {
7171 // console.log('componentMap has changed')
72- this .value = ' '
72+ this .selected = ' '
7373 }
7474 }
7575 }
7676}
7777 </script >
7878
79- <style src="vue-multiselect/dist/vue-multiselect.min . css "></style >
79+ <style src="vue-multiselect/dist/vue-multiselect.css "></style >
8080<style scoped>
8181 #parent-select {
8282 height : 30px ;
0 commit comments