EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Restore model collection on page back
Yurii57d9639d6e56
diff --git a/client/src/views/modals/detail.js b/client/src/views/modals/detail.jsindex 8cd53a5750..1b18e887f5 100644--- a/client/src/views/modals/detail.js+++ b/client/src/views/modals/detail.js@@ -594,6 +594,9 @@ class DetailModalView extends ModalView {collection.fetch().then(() => {+ // Restore as it can be removed by fetch.+ this.model.collection = collection;+const indexOfRecord = collection.length - 1;if (indexOfRecord < 0) {diff --git a/client/src/views/record/detail.ts b/client/src/views/record/detail.tsindex 2236dac521..316db56917 100644--- a/client/src/views/record/detail.ts+++ b/client/src/views/record/detail.ts@@ -2420,6 +2420,9 @@ class DetailRecordView<S extends DetailRecordViewSchema = DetailRecordViewSchemacollection.fetch().then(() => {+ // Restore as it's removed by fetch.+ this.model.collection = collection;+const indexOfRecord = collection.length - 1;if (indexOfRecord < 0) {