EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix save event
Yuri Kuznetsova9dee67243fb
diff --git a/client/src/views/record/base.js b/client/src/views/record/base.jsindex 8662225a52..5ae6e19f1d 100644--- a/client/src/views/record/base.js+++ b/client/src/views/record/base.js@@ -1089,6 +1089,8 @@ class BaseRecordView extends View {this.trigger('before:save');model.trigger('before:save');+ const initialAttributes = this.attributes;+return new Promise((resolve, reject) => {model.save(setAttributes, {@@ -1096,7 +1098,7 @@ class BaseRecordView extends View {headers: headers,}).then(() => {- this.trigger('save', this.attributes, Object.keys(setAttributes));+ this.trigger('save', initialAttributes, Object.keys(setAttributes));this.afterSave();