Browse Source

fix(ui): resolve type errors

pull/7355/head
KenTandrian 4 days ago
parent
commit
813efdc6cb
  1. 12
      libs/ui/src/lib/currency-selector/currency-selector.component.ts
  2. 12
      libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts

12
libs/ui/src/lib/currency-selector/currency-selector.component.ts

@ -75,22 +75,22 @@ export class GfCurrencySelectorComponent
private readonly input = viewChild.required(MatInput); private readonly input = viewChild.required(MatInput);
public constructor( public constructor(
public readonly _elementRef: ElementRef, public override readonly _elementRef: ElementRef,
public readonly _focusMonitor: FocusMonitor, public override readonly _focusMonitor: FocusMonitor,
public readonly changeDetectorRef: ChangeDetectorRef, public readonly changeDetectorRef: ChangeDetectorRef,
private readonly formGroupDirective: FormGroupDirective, private readonly formGroupDirective: FormGroupDirective,
public readonly ngControl: NgControl public override readonly ngControl: NgControl
) { ) {
super(_elementRef, _focusMonitor, ngControl); super(_elementRef, _focusMonitor, ngControl);
this.controlType = 'currency-selector'; this.controlType = 'currency-selector';
} }
public get empty() { public override get empty() {
return this.input().empty; return this.input().empty;
} }
public set value(value: string | null) { public override set value(value: string | null) {
this.control.setValue(value); this.control.setValue(value);
super.value = value; super.value = value;
} }
@ -138,7 +138,7 @@ export class GfCurrencySelectorComponent
}); });
} }
public ngDoCheck() { public override ngDoCheck() {
if (this.ngControl) { if (this.ngControl) {
this.validateRequired(); this.validateRequired();
this.errorState = !!(this.ngControl.invalid && this.ngControl.touched); this.errorState = !!(this.ngControl.invalid && this.ngControl.touched);

12
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts

@ -95,22 +95,22 @@ export class GfSymbolAutocompleteComponent
private readonly input = viewChild.required(MatInput); private readonly input = viewChild.required(MatInput);
public constructor( public constructor(
public readonly _elementRef: ElementRef, public override readonly _elementRef: ElementRef<HTMLElement>,
public readonly _focusMonitor: FocusMonitor, public override readonly _focusMonitor: FocusMonitor,
public readonly changeDetectorRef: ChangeDetectorRef, public readonly changeDetectorRef: ChangeDetectorRef,
public readonly dataService: DataService, public readonly dataService: DataService,
public readonly ngControl: NgControl public override readonly ngControl: NgControl
) { ) {
super(_elementRef, _focusMonitor, ngControl); super(_elementRef, _focusMonitor, ngControl);
this.controlType = 'symbol-autocomplete'; this.controlType = 'symbol-autocomplete';
} }
public get empty() { public override get empty() {
return this.input().empty; return this.input().empty;
} }
public set value(value: LookupItem) { public override set value(value: LookupItem) {
this.control.setValue(value); this.control.setValue(value);
super.value = value; super.value = value;
} }
@ -188,7 +188,7 @@ export class GfSymbolAutocompleteComponent
}); });
} }
public ngDoCheck() { public override ngDoCheck() {
if (this.ngControl) { if (this.ngControl) {
this.validateRequired(); this.validateRequired();
this.errorState = !!(this.ngControl.invalid && this.ngControl.touched); this.errorState = !!(this.ngControl.invalid && this.ngControl.touched);

Loading…
Cancel
Save