From 819cf8a1f1766ceda68383047f7bb4767cdc032c Mon Sep 17 00:00:00 2001 From: Wroud Date: Tue, 12 Jul 2022 14:06:12 +0300 Subject: [PATCH] feat(core-view): CB-2029 action activation fn --- webapp/packages/core-view/src/Action/ActionService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/packages/core-view/src/Action/ActionService.ts b/webapp/packages/core-view/src/Action/ActionService.ts index 9333ccdc7a..8a2301583d 100644 --- a/webapp/packages/core-view/src/Action/ActionService.ts +++ b/webapp/packages/core-view/src/Action/ActionService.ts @@ -25,6 +25,12 @@ export class ActionService { this.handlers = new Map(); } + activateAction(context: IDataContextProvider, action: IAction) { + this + .getAction(context, action) + ?.activate(); + } + addHandler(handler: IActionHandler): void { if (this.handlers.has(handler.id)) { throw new Error(`Action handler with same id (${handler.id}) already exists`);