EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
create category fix
Yuriid69db3689f77
diff --git a/client/src/utils.js b/client/src/utils.jsindex 2080d78d64..dde58a6b0a 100644--- a/client/src/utils.js+++ b/client/src/utils.js@@ -123,6 +123,7 @@ Espo.Utils = {else if (typeof view[method] === 'function') {if (view?.events[`click [data-action="${action}"]`]) {// Prevents from firing if a handler is already assigned. Important.+ // Does not prevent if handled from a nested view. @todoreturn false;}diff --git a/client/src/views/record/list-nested-categories.js b/client/src/views/record/list-nested-categories.jsindex 8e422a07bc..517f831f7d 100644--- a/client/src/views/record/list-nested-categories.js+++ b/client/src/views/record/list-nested-categories.js@@ -197,7 +197,7 @@ class ListNestedCategoriesRecordView extends View {this.listenTo(this.collection, 'sync', () => this.reRender());this.listenTo(this.itemCollection, 'sync', () => this.reRender());- this.addActionHandler('createCategory', () => this.actionCreateCategory());+ this.addActionHandler('createCategory', event => this.handleCreateCategory(event));}// noinspection JSUnusedGlobalSymbols@@ -211,9 +211,12 @@ class ListNestedCategoriesRecordView extends View {}/**+ * @param {MouseEvent} event* @private*/- async actionCreateCategory() {+ async handleCreateCategory(event) {+ event.preventDefault();+const categoryData = this.collection.categoryData || {};const view = await new RecordModalHelper().showCreate(this, {