From 395d4f49004c57f471fdaa727b26cbf518e1d961 Mon Sep 17 00:00:00 2001 From: fe-dev Date: Wed, 29 Jun 2022 09:20:40 +0300 Subject: [PATCH 1/2] UI: Bug fix validation queue form --- .../app/modules/home/components/queue/queue-form.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts index b84dfc9985..c1aecea4b2 100644 --- a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts +++ b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts @@ -209,6 +209,7 @@ export class QueueFormComponent implements ControlValueAccessor, OnInit, OnDestr } else { batchSizeField.patchValue(null, {emitEvent: false}); batchSizeField.clearValidators(); + batchSizeField.updateValueAndValidity(); this.hideBatchSize = false; } } From 27e3070b7a8cbb04ad8b0e7a3133410d914bcfb0 Mon Sep 17 00:00:00 2001 From: fe-dev Date: Wed, 29 Jun 2022 15:02:30 +0300 Subject: [PATCH 2/2] UI: Refactoring --- .../app/modules/home/components/queue/queue-form.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts index c1aecea4b2..add3c26007 100644 --- a/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts +++ b/ui-ngx/src/app/modules/home/components/queue/queue-form.component.ts @@ -205,11 +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(); + batchSizeField.updateValueAndValidity({emitEvent: false}); this.hideBatchSize = false; } }