EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
list sync keep modal
Yuri Kuznetsovb247b00bd778
diff --git a/client/src/views/record/kanban.js b/client/src/views/record/kanban.jsindex 45df63a013..6ab5758ddd 100644--- a/client/src/views/record/kanban.js+++ b/client/src/views/record/kanban.js@@ -385,14 +385,7 @@ class KanbanRecordView extends ListRecordView {this.listenTo(this.collection, 'sync', () => {this._renderEmpty = false;- if (this.hasView('modal') && this.getView('modal').isRendered()) {- // @todo Find a way to not to re-render modals.- return;- }-- this.buildRows(() => {- this.render();- });+ this.buildRowsAndRender();});this.collection.listenTo(diff --git a/client/src/views/record/list.js b/client/src/views/record/list.jsindex 6d0bd5775c..6e128d63a1 100644--- a/client/src/views/record/list.js+++ b/client/src/views/record/list.js@@ -2062,11 +2062,6 @@ class ListRecordView extends View {this.listenTo(this.collection, 'sync', (c, r, options) => {this._renderEmpty = false;- if (this.hasView('modal') && this.getView('modal').isRendered()) {- // @todo Find a way to not to re-render modals.- return;- }-options = options || {};if (options.previousDataList) {@@ -2097,9 +2092,7 @@ class ListRecordView extends View {this.checkedList = [];this.allResultIsChecked = false;- this.buildRows(() => {- this.render();- });+ this.buildRowsAndRender();});this.checkedList = [];@@ -2145,6 +2138,29 @@ class ListRecordView extends View {}}+ /**+ * @protected+ * @since 9.1.0+ */+ buildRowsAndRender() {+ let modalView;+ const modalKey = 'modal';++ if (this.hasView(modalKey) && this.getView(modalKey).isRendered()) {+ modalView = this.getView(modalKey);++ this.unchainView(modalKey);+ }++ this.buildRows(async () => {+ await this.reRender({force: true});++ if (modalView) {+ this.setView(modalKey, modalView);+ }+ });+ }+/*** @private* @param {string} id