mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Reset previous errors when new set of errors is provided
This commit is contained in:
@@ -178,11 +178,12 @@ export default {
|
||||
const params = this.buildFormData();
|
||||
if (JSON.stringify(params) != JSON.stringify(this.formData)) {
|
||||
this.formData = params;
|
||||
this.resetError();
|
||||
this.resetErrors();
|
||||
this.$emit("onChange", params, refreshOnChange);
|
||||
}
|
||||
},
|
||||
onErrors() {
|
||||
this.resetErrors();
|
||||
if (this.errors) {
|
||||
const errorMessages = matchErrors(this.formIndex, this.errors);
|
||||
for (const inputId in errorMessages) {
|
||||
@@ -234,7 +235,7 @@ export default {
|
||||
input.warning = message;
|
||||
}
|
||||
},
|
||||
resetError() {
|
||||
resetErrors() {
|
||||
Object.values(this.formIndex).forEach((input) => {
|
||||
input.error = null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user