Skip to content

Commit

Permalink
#104546 - fix vue sometimes not triggering updates in the view on sel…
Browse files Browse the repository at this point in the history
…ected item change
  • Loading branch information
ofrankowska committed May 9, 2024
1 parent f334a07 commit 6f95108
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions view/adminhtml/web/vue/field-type/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@
},
set(option) {
if (option && typeof option === 'object') {
this.item[this.itemKey] = option.value.toString();
this.item[this.itemIdKey] = option.id.toString();
this.$set(this.item, this.itemKey, option.value.toString());
this.$set(this.item, this.itemIdKey, option.id.toString());
}
else if (option && typeof option === 'string') {
this.item[this.itemKey] = option;
this.$set(this.item, this.itemKey, option);
}
else {
this.item[this.itemKey] = this.defaultSelectedOption ? this.defaultSelectedOption.value.toString() : '';
this.$set(this.item, this.itemKey, this.defaultSelectedOption ? this.defaultSelectedOption.value.toString() : '');
}
}
},
Expand Down

0 comments on commit 6f95108

Please sign in to comment.