mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
address selection: filter cities based on country
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
<div class="container">
|
||||
<select
|
||||
v-model="selected">
|
||||
<option :value="{}" disabled selected>{{ $t('select_country') }}</option>
|
||||
<option :value="{}" selected disabled>{{ $t('select_country') }}</option>
|
||||
<option
|
||||
v-for="item in this.countries"
|
||||
v-bind:item="item"
|
||||
v-bind:key="item.id"
|
||||
v-bind:value="item">
|
||||
v-bind:value="item"
|
||||
v-bind:selected="item.countryCode === 'FR'">
|
||||
{{ item.name.fr }}
|
||||
</option>
|
||||
</select>
|
||||
@@ -19,6 +20,9 @@
|
||||
export default {
|
||||
name: 'CountrySelection',
|
||||
props: ['address', 'getCities'],
|
||||
// data: () => {
|
||||
// selected: this.address.loaded.countries.filter(c => c.countryCode === 'FR')[0]
|
||||
// },
|
||||
computed: {
|
||||
countries() {
|
||||
const countries = this.address.loaded.countries;
|
||||
|
Reference in New Issue
Block a user