ui: Ensure we dispatch validation state (#14021)

* ui: Ensure we dispatch validation state

* Changelog
This commit is contained in:
John Cowen 2022-08-08 11:12:40 +01:00 committed by GitHub
parent d7ed357b5b
commit 6aedc41d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

3
.changelog/14021.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fixes an issue where client side validation errors were not showing in certain areas
```

View File

@ -34,10 +34,10 @@ export default class ValidateModifier extends Modifier {
}
if(Object.keys(errors).length > 0) {
state.context.errors = errors;
this.hash.chart.dispatch("ERROR");
this.hash.chart.dispatch("ERROR", state.context);
} else {
state.context.errors = null;
this.hash.chart.dispatch("RESET");
this.hash.chart.dispatch("RESET", state.context);
}
}
@ -61,7 +61,7 @@ export default class ValidateModifier extends Modifier {
});
if(Object.keys(state.context.errors).length === 0) {
state.context.errors = null;
this.hash.chart.dispatch("RESET");
this.hash.chart.dispatch("RESET", state.context);
}
}
}