From 2c639d534b3f0b6c98f6e4893f5cc2581a56f9c5 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 24 Mar 2026 14:12:57 +0200 Subject: [PATCH] Fix toggle disabled behavior via form control API Disable the keyFiltersOperation form control when OR is not allowed. This uses Angular's reactive form disabled state which properly propagates through setDisabledState to tb-toggle-select, greying out the entire toggle. If the filter had OR saved, it resets to AND and marks the form dirty so Update is enabled. The tooltip on hover explains why the toggle is disabled. --- .../components/filter/filter-dialog.component.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/filter/filter-dialog.component.ts b/ui-ngx/src/app/modules/home/components/filter/filter-dialog.component.ts index 10c3941ee6..334ce90931 100644 --- a/ui-ngx/src/app/modules/home/components/filter/filter-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/filter/filter-dialog.component.ts @@ -100,16 +100,12 @@ export class FilterDialogComponent extends DialogComponent { - if (value === ComplexOperation.OR) { - this.filterFormGroup.get('keyFiltersOperation').setValue(ComplexOperation.AND); - } - }); + if (this.filter.keyFiltersOperation === ComplexOperation.OR) { + this.filterFormGroup.get('keyFiltersOperation').setValue(ComplexOperation.AND); + this.filterFormGroup.markAsDirty(); + } + this.filterFormGroup.get('keyFiltersOperation').disable(); } }