feat(editor): Support relative dependent parameters for collection NodeProperties (#18916)

This commit is contained in:
Charlie Kolb
2025-08-28 16:34:23 +02:00
committed by GitHub
parent 44b686e944
commit a15391acc9
6 changed files with 65 additions and 8 deletions

View File

@@ -21,7 +21,12 @@ import type {
IParameterLabel,
NodeParameterValueType,
} from 'n8n-workflow';
import { CREDENTIAL_EMPTY_VALUE, isResourceLocatorValue, NodeHelpers } from 'n8n-workflow';
import {
CREDENTIAL_EMPTY_VALUE,
isResourceLocatorValue,
NodeHelpers,
resolveRelativePath,
} from 'n8n-workflow';
import type { CodeNodeLanguageOption } from '@/components/CodeNodeEditor/CodeNodeEditor.vue';
import CodeNodeEditor from '@/components/CodeNodeEditor/CodeNodeEditor.vue';
@@ -376,7 +381,9 @@ const dependentParametersValues = computed<string | null>(() => {
const resolvedNodeParameters = workflowHelpers.resolveParameter(currentNodeParameters);
const returnValues: string[] = [];
for (const parameterPath of loadOptionsDependsOn) {
for (let parameterPath of loadOptionsDependsOn) {
parameterPath = resolveRelativePath(props.path, parameterPath);
returnValues.push(get(resolvedNodeParameters, parameterPath) as string);
}