I created a custom row action using the following code to extend the RowActionHandler class:
However, it doesn't work. Nothing is logged when I click the PlacementCancel button.
I can make it work by explicitly overriding the process method:
Is it possible to make it route directly to the action without overriding the process method? I would think that Espo's routing could handle this automatically.
Code:
define(['handlers/row-action'], function (RowActionHandler) { class CustomRowActionHandler extends RowActionHandler { actionPlacementCancel(data) { console.log('Cancel Placement clicked for record:', data.id); } } return CustomRowActionHandler; });
I can make it work by explicitly overriding the process method:
Code:
define(['handlers/row-action'], function (RowActionHandler) { class CustomRowActionHandler extends RowActionHandler { actionPlacementCancel(data) { console.log('Cancel Placement clicked for record:', data.id); } process(model, action) { if (action === 'PlacementCancel') { this.actionPlacementCancel(model); } else { super.process(model, action); } } } return CustomRowActionHandler; });
Is it possible to make it route directly to the action without overriding the process method? I would think that Espo's routing could handle this automatically.
Comment