fix: Custom attribute not getting changed on conversations (#3965)

This commit is contained in:
Nithin David Thomas 2022-02-14 15:52:15 +05:30 committed by GitHub
parent 74d9203868
commit 2c15d5b4f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 => {