From c06c8b817ed92ded73871d973cb1bc9d612a64dd Mon Sep 17 00:00:00 2001 From: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com> Date: Fri, 11 Feb 2022 11:53:50 +0100 Subject: [PATCH] fixes numbering system for dynamic bindings in evaluated popup text (#11005) --- .../editorComponents/CodeEditor/EvaluatedValuePopup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx b/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx index 9f5534eeff..1a98bf4dba 100644 --- a/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx @@ -237,8 +237,9 @@ export function PreparedStatementViewer(props: { }); return
; } - const stringSegments = value.split(/\$\d/); - const $params = [...value.matchAll(/\$\d/g)].map((matches) => matches[0]); + const stringSegments = value.split(/\$\d+/); + const $params = [...value.matchAll(/\$\d+/g)].map((matches) => matches[0]); + const paramsWithTooltips = $params.map((param) => ( {parameters[param]}} key={param}>