Skip to content

Commit

Permalink
Prevent overwriting existing this.selectListOptions object properties…
Browse files Browse the repository at this point in the history
… by using Object.assign instead of this.$set
  • Loading branch information
sanjacornelius committed Jul 3, 2024
1 parent 65e000e commit 66f6a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FormSelectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default {
updateOption(updatedValue) {
const index = this.selectListOptions.findIndex((option) => option.id === updatedValue.id);
if (index !== -1) {
this.$set(this.selectListOptions, index, updatedValue);
Object.assign(this.selectListOptions[index], updatedValue);
}
},
/**
Expand Down

0 comments on commit 66f6a92

Please sign in to comment.