From c4c55980fb922d1d013a9b95ee695039a968a8a2 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 26 Jun 2024 16:42:03 +0300 Subject: [PATCH] UI: Refactoring --- .../lib/settings/common/color-range-list.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-list.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-list.component.ts index 1c71850cb5..aa69b05d75 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-list.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-list.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { ChangeDetectorRef, Component, forwardRef, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, forwardRef, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { AbstractControl, ControlValueAccessor, @@ -97,8 +97,7 @@ export class ColorRangeListComponent implements OnInit, ControlValueAccessor, On private propagateChange = (v: any) => { }; - constructor(private fb: UntypedFormBuilder, - private cd: ChangeDetectorRef) {} + constructor(private fb: UntypedFormBuilder) {} ngOnInit(): void { this.colorRangeListFormGroup = this.fb.group({ @@ -226,7 +225,6 @@ export class ColorRangeListComponent implements OnInit, ControlValueAccessor, On this.rangeListFormArray.push(this.colorRangeControl(newRange)); this.colorRangeListFormGroup.markAsDirty(); setTimeout(() => {this.popover?.updatePosition();}, 0); - this.cd.detectChanges(); } }