mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
Avoid update local props while user is editing corresponding fields
This commit is contained in:
@@ -39,30 +39,26 @@
|
||||
data-description="annotation input"
|
||||
@keyup.esc="onToggle" />
|
||||
<StatelessTags v-if="localProps.tags" class="mb-3 tags" v-model="localProps.tags" />
|
||||
<b-button
|
||||
class="save-button mb-1"
|
||||
data-description="editor save button"
|
||||
size="sm"
|
||||
variant="primary"
|
||||
:disabled="!localProps.name"
|
||||
@click="onSave">
|
||||
<Icon icon="save" />
|
||||
<span v-localize>Save</span>
|
||||
</b-button>
|
||||
<b-button
|
||||
class="cancel-button mb-1"
|
||||
data-description="editor cancel button"
|
||||
size="sm"
|
||||
icon="undo"
|
||||
@click="onToggle">
|
||||
<Icon icon="undo" />
|
||||
<span v-localize>Cancel</span>
|
||||
</b-button>
|
||||
</div>
|
||||
<nav class="edit-controls">
|
||||
<template v-if="editing">
|
||||
<b-button
|
||||
class="save-button mb-1"
|
||||
data-description="editor save button"
|
||||
size="sm"
|
||||
variant="primary"
|
||||
:disabled="!localProps.name"
|
||||
@click="onSave">
|
||||
<Icon icon="save" />
|
||||
<span v-localize>Save</span>
|
||||
</b-button>
|
||||
<b-button
|
||||
class="cancel-button mb-1"
|
||||
data-description="editor cancel button"
|
||||
size="sm"
|
||||
icon="undo"
|
||||
@click="onToggle">
|
||||
<Icon icon="undo" />
|
||||
<span v-localize>Cancel</span>
|
||||
</b-button>
|
||||
</template>
|
||||
</nav>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -90,35 +86,18 @@ export default {
|
||||
localProps: {},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
name() {
|
||||
this.localProps.name = this.name;
|
||||
},
|
||||
annotation() {
|
||||
this.localProps.annotation = this.annotation;
|
||||
},
|
||||
tags() {
|
||||
this.localProps.tags = this.tags;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.onReset();
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.localProps = {
|
||||
name: this.name,
|
||||
annotation: this.annotation,
|
||||
tags: this.tags,
|
||||
};
|
||||
},
|
||||
onSave() {
|
||||
this.editing = false;
|
||||
this.$emit("save", Object.assign({}, this.localProps));
|
||||
},
|
||||
onToggle() {
|
||||
this.editing = !this.editing;
|
||||
this.onReset();
|
||||
this.localProps = {
|
||||
name: this.name,
|
||||
annotation: this.annotation,
|
||||
tags: this.tags,
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1510,6 +1510,7 @@ class NavigatesGalaxy(HasDriver):
|
||||
editable_text_input_element.clear()
|
||||
editable_text_input_element.send_keys(new_name)
|
||||
self.send_enter(editable_text_input_element)
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
return editable_text_input_element
|
||||
|
||||
def history_panel_name_input(self):
|
||||
|
||||
Reference in New Issue
Block a user