diff --git a/view/adminhtml/web/vue/field-type/autocomplete-lazy.vue b/view/adminhtml/web/vue/field-type/autocomplete-lazy.vue index fff89d21..b94bdab3 100644 --- a/view/adminhtml/web/vue/field-type/autocomplete-lazy.vue +++ b/view/adminhtml/web/vue/field-type/autocomplete-lazy.vue @@ -230,7 +230,9 @@ } else if (option && typeof option === 'string') { this.$set(this.item, this.itemKey, option); - this.$set(this.item, 'title', this.options.find(item => item.value === option)?.label); + if (!this.item.title) { + this.$set(this.item, 'title', this.options.find(item => item.value === option)?.label); + } } else { this.$set(this.item, this.itemKey, this.defaultSelectedOption ? this.defaultSelectedOption.value.toString() : ''); diff --git a/view/adminhtml/web/vue/field-type/autocomplete.vue b/view/adminhtml/web/vue/field-type/autocomplete.vue index a8ea0955..276f0a65 100644 --- a/view/adminhtml/web/vue/field-type/autocomplete.vue +++ b/view/adminhtml/web/vue/field-type/autocomplete.vue @@ -131,11 +131,15 @@ if (option && typeof option === 'object') { this.$set(this.item, this.itemKey, option.value.toString()); this.$set(this.item, this.itemIdKey, option.id.toString()); - this.$set(this.item, 'title', option.label); + if (!this.item.title) { + this.$set(this.item, 'title', option.label); + } } else if (option && typeof option === 'string') { this.$set(this.item, this.itemKey, option); - this.$set(this.item, 'title', this.options.find(item => item.value === option)?.label); + if (!this.item.title) { + this.$set(this.item, 'title', this.options.find(item => item.value === option)?.label); + } } else { this.$set(this.item, this.itemKey, this.defaultSelectedOption ? this.defaultSelectedOption.value.toString() : '');