From a53c203286823fa6f47d1479d9a3d6e91d8ce408 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Sun, 18 Apr 2021 23:20:58 -0500 Subject: [PATCH] Parse Custom sproc parameters (#693) * Parse Custom sproc parameters * Fix PK value parsing too --- src/Explorer/Panes/ExecuteSprocParamsPanel/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Explorer/Panes/ExecuteSprocParamsPanel/index.tsx b/src/Explorer/Panes/ExecuteSprocParamsPanel/index.tsx index 900ab56c0..cd8a3334c 100644 --- a/src/Explorer/Panes/ExecuteSprocParamsPanel/index.tsx +++ b/src/Explorer/Panes/ExecuteSprocParamsPanel/index.tsx @@ -79,8 +79,15 @@ export const ExecuteSprocParamsPanel: FunctionComponent sprocParam.text); - storedProcedure.execute(sprocParams, partitionValue); + const sprocParams = + wrappedSprocParams && + wrappedSprocParams.map((sprocParam) => { + if (sprocParam.key === "custom") { + return JSON.parse(sprocParam.text); + } + return sprocParam.text; + }); + storedProcedure.execute(sprocParams, partitionKey === "custom" ? JSON.parse(partitionValue) : partitionValue); setLoadingFalse(); closePanel(); };