diff --git a/client/src/views/record/kanban-item.js b/client/src/views/record/kanban-item.js index 407dd932cb..eff4c10d36 100644 --- a/client/src/views/record/kanban-item.js +++ b/client/src/views/record/kanban-item.js @@ -94,6 +94,9 @@ class KanbanRecordItem extends View { model: this.model, acl: acl, statusFieldIsEditable: this.options.statusFieldIsEditable, + rowActionHandlers: this.options.rowActionHandlers || {}, + additionalActionList: this.options.additionalRowActionList, + scope: this.options.scope, }); } } diff --git a/client/src/views/record/kanban.js b/client/src/views/record/kanban.js index 97f6437d0e..307a3de739 100644 --- a/client/src/views/record/kanban.js +++ b/client/src/views/record/kanban.js @@ -283,6 +283,8 @@ class KanbanRecordView extends ListRecordView { this.seedCollection.orderBy = this.collection.defaultOrderBy; this.seedCollection.order = this.collection.defaultOrder; + this.setupRowActionDefs(); + this.listenTo(this.collection, 'sync', () => { if (this.hasView('modal') && this.getView('modal').isRendered()) { return; @@ -835,8 +837,11 @@ class KanbanRecordView extends ListRecordView { itemLayout: this.listLayout, rowActionsDisabled: this.rowActionsDisabled, rowActionsView: this.rowActionsView, + rowActionHandlers: this._rowActionHandlers || {}, setViewBeforeCallback: this.options.skipBuildRows && !this.isRendered(), statusFieldIsEditable: this.statusFieldIsEditable, + additionalRowActionList: this._additionalRowActionList, + scope: this.scope, }, callback); } diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index a517d5a222..4d13418209 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -1984,8 +1984,6 @@ class ListRecordView extends View { this.layoutName += 'Portal'; } - this._rowActionHandlers = {}; - this.setupRowActionDefs(); this.wait( @@ -3289,6 +3287,8 @@ class ListRecordView extends View { } setupRowActionDefs() { + this._rowActionHandlers = {}; + const list = this.options.additionalRowActionList; if (!list) { diff --git a/client/src/views/record/row-actions/default.js b/client/src/views/record/row-actions/default.js index f940fa775b..ec0014cfed 100644 --- a/client/src/views/record/row-actions/default.js +++ b/client/src/views/record/row-actions/default.js @@ -37,7 +37,7 @@ class DefaultRowActionsView extends View { setup() { this.options.acl = this.options.acl || {}; - this.scope = this.options.scope; + this.scope = this.options.scope || this.model.entityType; /** @type {Object.} */ this.handlers = this.options.rowActionHandlers || {};