3
0

Fix select field options translation saving order to prevent stale values

This commit is contained in:
Jože Fortun 2023-07-19 17:10:44 +02:00
parent 295defc9a9
commit 311c879882

View File

@ -128,8 +128,7 @@ export default {
return this.$ComposeAPI
.moduleUpdateTranslations({ namespaceID, moduleID, translations })
// re-fetch translations, sanitized and stripped
.then(() => this.fetcher())
.then((translations) => {
.then(() => {
// When translations are successfully saved,
// scan changes and apply them back to the passed object
// not the most elegant solution but is saves us from
@ -139,6 +138,7 @@ export default {
// the logic there needs to be implemented; the idea is to encode
// values from the set of translations back to the resource object
moduleFieldSelectResTr(this.field, translations, this.currentLanguage, this.resource)
this.fetcher()
})
}
},