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 <VueMultiselect
name="selectLocation" name="selectLocation"
id="selectLocation" id="selectLocation"
label="name"
track-by="id" track-by="id"
open-direction="top"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
open-direction="top"
:placeholder="$t('activity.choose_location')" :placeholder="$t('activity.choose_location')"
label="name"
:custom-label="customLabel" :custom-label="customLabel"
v-model="location" :options="locations"
:options="locations"> v-model="location">
</VueMultiselect> </VueMultiselect>
<new-location @saveNewLocation="saveNewLocation"></new-location> <new-location @saveNewLocation="saveNewLocation"></new-location>
@ -73,11 +73,16 @@ export default {
let body = { let body = {
type: 'location', type: 'location',
name: selected.name, name: selected.name,
address: { id: selected.addressId }, address: {
locationType: { id: selected.type, type: 'location-type' }, id: selected.addressId
email: selected.email, },
locationType: {
id: selected.type,
type: 'location-type'
},
phonenumber1: selected.phonenumber1, phonenumber1: selected.phonenumber1,
phonenumber2: selected.phonenumber2, phonenumber2: selected.phonenumber2,
email: selected.email,
} }
postLocation(body).then(location => new Promise(resolve => { postLocation(body).then(location => new Promise(resolve => {
console.log('postLocation', location); 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> </script>

View File

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