mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 07:19:13 +08:00
Also debounce label
Not sure if that really works, I assume `form.trigger("change")` is
what's updating the label on the Node vue instance ?
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user