fix invisible selected item in multiselect

This commit is contained in:
Mathieu Jaumotte 2021-10-15 15:37:16 +02:00
parent 6876c23adb
commit 6565e3f8e3
2 changed files with 13 additions and 15 deletions

View File

@ -9,15 +9,15 @@
<VueMultiselect
name="selectLocation"
id="selectLocation"
label="name"
track-by="id"
open-direction="top"
:multiple="false"
:searchable="true"
open-direction="top"
:placeholder="$t('activity.choose_location')"
label="name"
:custom-label="customLabel"
v-model="location"
:options="locations">
:options="locations"
v-model="location">
</VueMultiselect>
<new-location @saveNewLocation="saveNewLocation"></new-location>
@ -73,11 +73,16 @@ export default {
let body = {
type: 'location',
name: selected.name,
address: { id: selected.addressId },
locationType: { id: selected.type, type: 'location-type' },
email: selected.email,
address: {
id: selected.addressId
},
locationType: {
id: selected.type,
type: 'location-type'
},
phonenumber1: selected.phonenumber1,
phonenumber2: selected.phonenumber2,
email: selected.email,
}
postLocation(body).then(location => new Promise(resolve => {
console.log('postLocation', location);
@ -89,11 +94,4 @@ export default {
}
}
/*
*
* TODO
* - multiselect, n'affiche pas l'item choisi
* - addAddress, les multiselect pays/localité/adresse ne se remplissent pas
*
*/
</script>

View File

@ -205,7 +205,7 @@ export default {
</script>
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
<style lang="scss">
<style lang="scss" scoped>
span.multiselect__single {
display: none !important;
}