Skip to content

Commit

Permalink
DataLinks: Fix double dollar-sign bug in data-links editor (#58096)
Browse files Browse the repository at this point in the history
* fix template variable bug

* fix bug when adding vars before existing vars

* take 2--remove includeDollarSign logic

* take 3-add includeDollarSign logic for template vars
  • Loading branch information
zuchka committed Nov 16, 2022
1 parent 8756c4d commit aea860a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const DataLinkInput: React.FC<DataLinkInputProps> = memo(
if (item.origin !== VariableOrigin.Template || item.value === DataLinkBuiltInVars.includeVars) {
editor.insertText(`${includeDollarSign ? '$' : ''}\{${item.value}}`);
} else {
editor.insertText(`\${${item.value}:queryparam}`);
editor.insertText(`${includeDollarSign ? '$' : ''}\{${item.value}:queryparam}`);
}

setLinkUrl(editor.value);
Expand Down

0 comments on commit aea860a

Please sign in to comment.