fix(editor): Copy JSON from selected run if node has been multiple times (#13673)

This commit is contained in:
Jaakko Husso
2025-03-04 17:19:51 +02:00
committed by GitHub
parent 72c535f583
commit 5eddf00fa1
4 changed files with 388 additions and 8 deletions

View File

@@ -26,12 +26,11 @@ const props = withDefaults(
node: INodeUi;
paneType: string;
pushRef: string;
displayMode: string;
distanceFromActive: number;
selectedJsonPath: string;
jsonData: IDataObject[];
currentOutputIndex?: number;
runIndex?: number;
outputIndex: number | undefined;
runIndex: number | undefined;
}>(),
{
selectedJsonPath: nonExistingJsonPath,
@@ -71,7 +70,7 @@ function getJsonValue(): string {
selectedValue = clearJsonKey(pinnedData.data.value as object);
} else {
selectedValue = executionDataToJson(
nodeHelpers.getNodeInputData(props.node, props.runIndex, props.currentOutputIndex),
nodeHelpers.getNodeInputData(props.node, props.runIndex, props.outputIndex),
);
}
}
@@ -176,7 +175,7 @@ function handleCopyClick(commandData: { command: string }) {
</script>
<template>
<div :class="$style.actionsGroup">
<div :class="$style.actionsGroup" data-test-id="ndv-json-actions">
<n8n-icon-button
v-if="noSelection"
:title="i18n.baseText('runData.copyToClipboard')"