mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix: More hints to nodes - regression for sub nodes (no-changelog) (#10690)
This commit is contained in:
parent
1dea8f4c7d
commit
37a808896e
|
@ -645,37 +645,44 @@ export default defineComponent({
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
getNodeHints(): NodeHint[] {
|
getNodeHints(): NodeHint[] {
|
||||||
if (this.node && this.nodeType) {
|
try {
|
||||||
const workflowNode = this.workflow.getNode(this.node.name);
|
if (this.node && this.nodeType) {
|
||||||
|
const workflowNode = this.workflow.getNode(this.node.name);
|
||||||
|
|
||||||
if (workflowNode) {
|
if (workflowNode) {
|
||||||
const executionHints = this.executionHints;
|
const executionHints = this.executionHints;
|
||||||
|
|
||||||
const nodeHints = NodeHelpers.getNodeHints(this.workflow, workflowNode, this.nodeType, {
|
const nodeHints = NodeHelpers.getNodeHints(this.workflow, workflowNode, this.nodeType, {
|
||||||
runExecutionData: this.workflowExecution?.data ?? null,
|
runExecutionData: this.workflowExecution?.data ?? null,
|
||||||
runIndex: this.runIndex,
|
runIndex: this.runIndex,
|
||||||
connectionInputData: this.parentNodeOutputData,
|
connectionInputData: this.parentNodeOutputData,
|
||||||
});
|
});
|
||||||
|
|
||||||
const hasMultipleInputItems =
|
const hasMultipleInputItems =
|
||||||
this.parentNodeOutputData.length > 1 || this.parentNodePinnedData.length > 1;
|
this.parentNodeOutputData.length > 1 || this.parentNodePinnedData.length > 1;
|
||||||
|
|
||||||
const nodeOutputData =
|
const nodeOutputData =
|
||||||
this.workflowRunData?.[this.node.name]?.[this.runIndex]?.data?.main[0] || [];
|
this.workflowRunData?.[this.node.name]?.[this.runIndex]?.data?.main?.[0] || [];
|
||||||
|
|
||||||
const genericHints = getGenericHints({
|
const genericHints = getGenericHints({
|
||||||
workflowNode,
|
workflowNode,
|
||||||
node: this.node,
|
node: this.node,
|
||||||
nodeType: this.nodeType,
|
nodeType: this.nodeType,
|
||||||
nodeOutputData,
|
nodeOutputData,
|
||||||
workflow: this.workflow,
|
workflow: this.workflow,
|
||||||
hasNodeRun: this.hasNodeRun,
|
hasNodeRun: this.hasNodeRun,
|
||||||
hasMultipleInputItems,
|
hasMultipleInputItems,
|
||||||
});
|
});
|
||||||
|
|
||||||
return executionHints.concat(nodeHints, genericHints).filter(this.shouldHintBeDisplayed);
|
return executionHints
|
||||||
|
.concat(nodeHints, genericHints)
|
||||||
|
.filter(this.shouldHintBeDisplayed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error while getting node hints', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
onItemHover(itemIndex: number | null) {
|
onItemHover(itemIndex: number | null) {
|
||||||
|
|
Loading…
Reference in a new issue