From 826b8bc667ed760a20720dbfe8bfa7743ef094c9 Mon Sep 17 00:00:00 2001 From: Bruno Alves de Faria Date: Mon, 7 Aug 2017 16:54:22 -0300 Subject: [PATCH] Adding the event as second parameter for dropdown actions --- Packages/ohif-core/client/components/base/mixins/action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/ohif-core/client/components/base/mixins/action.js b/Packages/ohif-core/client/components/base/mixins/action.js index 0679a6701..b9fc763e4 100644 --- a/Packages/ohif-core/client/components/base/mixins/action.js +++ b/Packages/ohif-core/client/components/base/mixins/action.js @@ -41,13 +41,13 @@ OHIF.mixins.action = new OHIF.Mixin({ if (typeof action === 'function') { // Call the action if it's a function - component.actionResult = action.call(event.currentTarget, params); + component.actionResult = action.call(event.currentTarget, params, event); } else if (!api || !action || typeof api[action] !== 'function') { // Stop here if no API or action was defined return true; } else { // Call the defined action function - component.actionResult = api[action].call(event.currentTarget, params); + component.actionResult = api[action].call(event.currentTarget, params, event); } // Prepend a spinner into the action element content if it's a promise