Browse Source

Merge pull request #6849 from ArtemDzhereleiko/AD/bug-fix/queue-form-validation

[3.4] UI: Hotfix of validation queue form
pull/6857/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
73ef527a1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts

2
ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts

@ -205,10 +205,12 @@ export class QueueFormComponent implements ControlValueAccessor, OnInit, OnDestr
if (type === QueueSubmitStrategyTypes.BATCH) {
batchSizeField.patchValue(1000, {emitEvent: false});
batchSizeField.setValidators([Validators.min(1), Validators.required]);
batchSizeField.updateValueAndValidity({emitEvent: false});
this.hideBatchSize = true;
} else {
batchSizeField.patchValue(null, {emitEvent: false});
batchSizeField.clearValidators();
batchSizeField.updateValueAndValidity({emitEvent: false});
this.hideBatchSize = false;
}
}

Loading…
Cancel
Save