diff --git a/app/javascript/dashboard/components/CustomAttribute.vue b/app/javascript/dashboard/components/CustomAttribute.vue index 41773b125..b9b769c44 100644 --- a/app/javascript/dashboard/components/CustomAttribute.vue +++ b/app/javascript/dashboard/components/CustomAttribute.vue @@ -141,16 +141,6 @@ export default { editedValue: null, }; }, - validations() { - if (this.isAttributeTypeLink) { - return { - editedValue: { required, url }, - }; - } - return { - editedValue: { required }, - }; - }, computed: { formattedValue() { @@ -209,6 +199,23 @@ export default { return this.editedValue; }, }, + watch: { + value() { + this.isEditing = false; + this.editedValue = this.value; + }, + }, + + validations() { + if (this.isAttributeTypeLink) { + return { + editedValue: { required, url }, + }; + } + return { + editedValue: { required }, + }; + }, mounted() { this.editedValue = this.formattedValue; bus.$on(BUS_EVENTS.FOCUS_CUSTOM_ATTRIBUTE, focusAttributeKey => {