feat(editor): Updating node reference pattern in expression editor (#6228)

* feat(editor): Updating node reference pattern in expression editor
*  Updated node ref when dragging data, telemetry and some comments
* ✔️ Updating tests
* 🔨 Removing old telemetry code, updating the current one based on the review feedback
* ✔️ Updating mapping e2e tests
This commit is contained in:
Milorad FIlipović
2023-05-12 11:45:10 +02:00
committed by GitHub
parent fc181ffbff
commit 13bcec1661
6 changed files with 43 additions and 45 deletions

View File

@@ -27,7 +27,8 @@ export function getMappedExpression({
distanceFromActive: number;
path: Array<string | number> | string;
}) {
const root = distanceFromActive === 1 ? '$json' : generatePath('$node', [nodeName, 'json']);
const root =
distanceFromActive === 1 ? '$json' : generatePath(`$('${nodeName}')`, ['item', 'json']);
if (typeof path === 'string') {
return `{{ ${root}${path} }}`;