Commit cba1bb3a authored by Giildo's avatar Giildo
Browse files

馃毀 User can change the default locale

parent a68269dc
This diff is collapsed.
......@@ -8,10 +8,11 @@
<usf-inputs-new-locale @add-locale="onAddLocale"/>
</v-col>
<v-col class="col-10">
<v-select v-model="defaultLocale.selected"
<v-select :value="field.internationalization.default"
:items="items"
label="Default locale"
clearable
@input="onUpdateDefaultLocale"
/>
</v-col>
</v-row>
......@@ -162,6 +163,15 @@ export default {
key.default = key.localeValue;
}
},
onUpdateDefaultLocale(newDefaultLocale) {
this.$store.dispatch(
'form/updateInternationalizationDefaultLocale',
{
id: this.fieldId,
newDefaultLocale,
},
);
},
updateLocaleList() {
Object.keys(this.field.internationalization.locales)
.forEach(local => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment