119799: Prevent submission from updating the dropdown values when hitting enter in another input form (onsubmit)

This commit is contained in:
Alexandre Vryghem
2024-12-04 17:16:14 +01:00
parent 404ccd9b0e
commit ed4e794d46
2 changed files with 7 additions and 2 deletions

View File

@@ -130,6 +130,9 @@ export class FormService {
}
public addControlErrors(field: AbstractControl, formId: string, fieldId: string, fieldIndex: number) {
if (field.errors === null) {
return;
}
const errors: string[] = Object.keys(field.errors)
.filter((errorKey) => field.errors[errorKey] === true)
.map((errorKey) => `error.validation.${errorKey}`);