UI: Refactoring

This commit is contained in:
Artem Dzhereleiko 2024-06-26 16:42:03 +03:00
parent 7be99bb01f
commit c4c55980fb

View File

@ -14,7 +14,7 @@
/// limitations under the License. /// 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 { import {
AbstractControl, AbstractControl,
ControlValueAccessor, ControlValueAccessor,
@ -97,8 +97,7 @@ export class ColorRangeListComponent implements OnInit, ControlValueAccessor, On
private propagateChange = (v: any) => { }; private propagateChange = (v: any) => { };
constructor(private fb: UntypedFormBuilder, constructor(private fb: UntypedFormBuilder) {}
private cd: ChangeDetectorRef) {}
ngOnInit(): void { ngOnInit(): void {
this.colorRangeListFormGroup = this.fb.group({ this.colorRangeListFormGroup = this.fb.group({
@ -226,7 +225,6 @@ export class ColorRangeListComponent implements OnInit, ControlValueAccessor, On
this.rangeListFormArray.push(this.colorRangeControl(newRange)); this.rangeListFormArray.push(this.colorRangeControl(newRange));
this.colorRangeListFormGroup.markAsDirty(); this.colorRangeListFormGroup.markAsDirty();
setTimeout(() => {this.popover?.updatePosition();}, 0); setTimeout(() => {this.popover?.updatePosition();}, 0);
this.cd.detectChanges();
} }
} }