mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20: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 '';
|
||||
},
|
||||
nodeTypeDescription(): string {
|
||||
if (this.nodeType && this.nodeType.description) {
|
||||
if (this.nodeType?.description) {
|
||||
const shortNodeType = this.$locale.shortNodeType(this.nodeType.name);
|
||||
|
||||
return this.$locale.headerText({
|
||||
|
@ -551,7 +551,7 @@ export default defineComponent({
|
|||
const { [lastNamePart]: removedNodeValue, ...remainingNodeValues } = tempValue;
|
||||
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
|
||||
// delete also the parent
|
||||
lastNamePart = nameParts.pop();
|
||||
|
@ -717,8 +717,8 @@ export default defineComponent({
|
|||
|
||||
this.workflowsStore.setNodeParameters(updateInformation);
|
||||
|
||||
this.updateNodeParameterIssues(node, nodeType);
|
||||
this.updateNodeCredentialIssues(node);
|
||||
this.updateNodeParameterIssuesByName(node.name);
|
||||
this.updateNodeCredentialIssuesByName(node.name);
|
||||
}
|
||||
} else if (parameterData.name.startsWith('parameters.')) {
|
||||
// A node parameter changed
|
||||
|
@ -800,8 +800,8 @@ export default defineComponent({
|
|||
oldNodeParameters,
|
||||
});
|
||||
|
||||
this.updateNodeParameterIssues(node, nodeType);
|
||||
this.updateNodeCredentialIssues(node);
|
||||
this.updateNodeParameterIssuesByName(node.name);
|
||||
this.updateNodeCredentialIssuesByName(node.name);
|
||||
this.$telemetry.trackNodeParametersValuesChange(nodeType.name, parameterData);
|
||||
} else {
|
||||
// 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
|
||||
updateNodeCredentialIssues(node: INodeUi): void {
|
||||
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
|
||||
updateNodeParameterIssues(node: INodeUi, nodeType?: INodeTypeDescription): void {
|
||||
if (nodeType === undefined) {
|
||||
|
|
Loading…
Reference in a new issue