mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix: Fix lag when node parameters are updated (#6941)
fix: Fix lag when node parameteres are updated
This commit is contained in:
parent
fde6ad1e7f
commit
3eb65e08c4
|
@ -248,7 +248,7 @@ export default defineComponent({
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
nodeTypeDescription(): string {
|
nodeTypeDescription(): string {
|
||||||
if (this.nodeType && this.nodeType.description) {
|
if (this.nodeType?.description) {
|
||||||
const shortNodeType = this.$locale.shortNodeType(this.nodeType.name);
|
const shortNodeType = this.$locale.shortNodeType(this.nodeType.name);
|
||||||
|
|
||||||
return this.$locale.headerText({
|
return this.$locale.headerText({
|
||||||
|
@ -551,7 +551,7 @@ export default defineComponent({
|
||||||
const { [lastNamePart]: removedNodeValue, ...remainingNodeValues } = tempValue;
|
const { [lastNamePart]: removedNodeValue, ...remainingNodeValues } = tempValue;
|
||||||
tempValue = remainingNodeValues;
|
tempValue = remainingNodeValues;
|
||||||
|
|
||||||
if (isArray === true && (tempValue as INodeParameters[]).length === 0) {
|
if (isArray && (tempValue as INodeParameters[]).length === 0) {
|
||||||
// If a value from an array got delete and no values are left
|
// If a value from an array got delete and no values are left
|
||||||
// delete also the parent
|
// delete also the parent
|
||||||
lastNamePart = nameParts.pop();
|
lastNamePart = nameParts.pop();
|
||||||
|
@ -717,8 +717,8 @@ export default defineComponent({
|
||||||
|
|
||||||
this.workflowsStore.setNodeParameters(updateInformation);
|
this.workflowsStore.setNodeParameters(updateInformation);
|
||||||
|
|
||||||
this.updateNodeParameterIssues(node, nodeType);
|
this.updateNodeParameterIssuesByName(node.name);
|
||||||
this.updateNodeCredentialIssues(node);
|
this.updateNodeCredentialIssuesByName(node.name);
|
||||||
}
|
}
|
||||||
} else if (parameterData.name.startsWith('parameters.')) {
|
} else if (parameterData.name.startsWith('parameters.')) {
|
||||||
// A node parameter changed
|
// A node parameter changed
|
||||||
|
@ -800,8 +800,8 @@ export default defineComponent({
|
||||||
oldNodeParameters,
|
oldNodeParameters,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.updateNodeParameterIssues(node, nodeType);
|
this.updateNodeParameterIssuesByName(node.name);
|
||||||
this.updateNodeCredentialIssues(node);
|
this.updateNodeCredentialIssuesByName(node.name);
|
||||||
this.$telemetry.trackNodeParametersValuesChange(nodeType.name, parameterData);
|
this.$telemetry.trackNodeParametersValuesChange(nodeType.name, parameterData);
|
||||||
} else {
|
} else {
|
||||||
// A property on the node itself changed
|
// A property on the node itself changed
|
||||||
|
|
|
@ -181,6 +181,14 @@ export const nodeHelpers = defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateNodeCredentialIssuesByName(name: string): void {
|
||||||
|
const node = this.workflowsStore.getNodeByName(name);
|
||||||
|
|
||||||
|
if (node) {
|
||||||
|
this.updateNodeCredentialIssues(node);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Updates the credential-issues of the node
|
// Updates the credential-issues of the node
|
||||||
updateNodeCredentialIssues(node: INodeUi): void {
|
updateNodeCredentialIssues(node: INodeUi): void {
|
||||||
const fullNodeIssues: INodeIssues | null = this.getNodeCredentialIssues(node);
|
const fullNodeIssues: INodeIssues | null = this.getNodeCredentialIssues(node);
|
||||||
|
@ -197,6 +205,14 @@ export const nodeHelpers = defineComponent({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateNodeParameterIssuesByName(name: string): void {
|
||||||
|
const node = this.workflowsStore.getNodeByName(name);
|
||||||
|
|
||||||
|
if (node) {
|
||||||
|
this.updateNodeParameterIssues(node);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Updates the parameter-issues of the node
|
// Updates the parameter-issues of the node
|
||||||
updateNodeParameterIssues(node: INodeUi, nodeType?: INodeTypeDescription): void {
|
updateNodeParameterIssues(node: INodeUi, nodeType?: INodeTypeDescription): void {
|
||||||
if (nodeType === undefined) {
|
if (nodeType === undefined) {
|
||||||
|
|
Loading…
Reference in a new issue