|
|
@ -9,7 +9,8 @@ import { |
|
|
Input, |
|
|
Input, |
|
|
OnDestroy, |
|
|
OnDestroy, |
|
|
OnInit, |
|
|
OnInit, |
|
|
ViewChild |
|
|
ViewChild, |
|
|
|
|
|
viewChild |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { |
|
|
import { |
|
|
FormControl, |
|
|
FormControl, |
|
|
@ -67,11 +68,10 @@ export class GfCurrencySelectorComponent |
|
|
@Input() private currencies: string[] = []; |
|
|
@Input() private currencies: string[] = []; |
|
|
@Input() private formControlName: string; |
|
|
@Input() private formControlName: string; |
|
|
|
|
|
|
|
|
@ViewChild(MatInput) private input: MatInput; |
|
|
|
|
|
|
|
|
|
|
|
public control = new FormControl<string | null>(null); |
|
|
public control = new FormControl<string | null>(null); |
|
|
public filteredCurrencies: string[] = []; |
|
|
public filteredCurrencies: string[] = []; |
|
|
|
|
|
|
|
|
|
|
|
private input = viewChild.required(MatInput); |
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
|
public constructor( |
|
|
public constructor( |
|
|
@ -87,7 +87,7 @@ export class GfCurrencySelectorComponent |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public get empty() { |
|
|
public get empty() { |
|
|
return this.input?.empty; |
|
|
return this.input().empty; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public set value(value: string | null) { |
|
|
public set value(value: string | null) { |
|
|
@ -96,7 +96,7 @@ export class GfCurrencySelectorComponent |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public focus() { |
|
|
public focus() { |
|
|
this.input.focus(); |
|
|
this.input().focus(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
public ngOnInit() { |
|
|
|