From 2e1b8bfa132d545bc11008684d143b7b115ef481 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 7 Feb 2022 13:01:13 +0530 Subject: [PATCH] fix: address not being set issue --- src/components/TwoColumnForm.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TwoColumnForm.vue b/src/components/TwoColumnForm.vue index 6542473b..b9a4e5cb 100644 --- a/src/components/TwoColumnForm.vue +++ b/src/components/TwoColumnForm.vue @@ -181,6 +181,9 @@ let TwoColumnForm = { return this.doc.rename(value); } + this.onChangeCommon(df, value); + }, + onChangeCommon(df, value) { this.doc.set(df.fieldname, value).catch((e) => { // set error message for this field this.$set(this.errors, df.fieldname, getErrorMessage(e, this.doc)); @@ -214,7 +217,7 @@ let TwoColumnForm = { if (!this.doc[df.fieldname]) { this.inlineEditDoc = await frappe.getNewDoc(df.target); this.inlineEditDoc.once('afterInsert', () => { - this.onChange(df, this.inlineEditDoc.name); + this.onChangeCommon(df, this.inlineEditDoc.name); }); } else { this.inlineEditDoc = this.doc.getLink(df.fieldname);