diff --git a/client/src/components/Workflow/Editor/Node.vue b/client/src/components/Workflow/Editor/Node.vue index 5539fa84c5d..d65aa1df53c 100644 --- a/client/src/components/Workflow/Editor/Node.vue +++ b/client/src/components/Workflow/Editor/Node.vue @@ -300,6 +300,14 @@ export default { this.annotation = annotation; }, 100); }, + setLabel(label) { + if (this.labelTimeout) { + clearTimeout(this.labelTimeout); + } + this.labelTimeout = setTimeout(() => { + this.label = label; + }, 100); + }, setData(data) { this.config_form = data.config_form; this.tool_state = data.tool_state; diff --git a/client/src/components/Workflow/Editor/modules/forms.js b/client/src/components/Workflow/Editor/modules/forms.js index a9eeab9f253..530720382a3 100644 --- a/client/src/components/Workflow/Editor/modules/forms.js +++ b/client/src/components/Workflow/Editor/modules/forms.js @@ -133,6 +133,7 @@ function _addLabelAnnotation(self, node) { help: _l("Add a step label."), fixed: true, onchange: function (new_label) { + node.setLabel(new_label); let duplicate = false; for (const i in workflow.nodes) { const n = workflow.nodes[i]; @@ -148,7 +149,6 @@ function _addLabelAnnotation(self, node) { "error_text", duplicate && "Duplicate label. Please fix this before saving the workflow." ); - self.form.trigger("change"); }, }); }