|
@ -50,6 +50,7 @@ export class SymbolAutocompleteComponent |
|
|
extends AbstractMatFormField<LookupItem> |
|
|
extends AbstractMatFormField<LookupItem> |
|
|
implements OnInit, OnDestroy |
|
|
implements OnInit, OnDestroy |
|
|
{ |
|
|
{ |
|
|
|
|
|
@Input() private includeIndices = false; |
|
|
@Input() public isLoading = false; |
|
|
@Input() public isLoading = false; |
|
|
|
|
|
|
|
|
@ViewChild(MatInput, { static: false }) private input: MatInput; |
|
|
@ViewChild(MatInput, { static: false }) private input: MatInput; |
|
@ -94,7 +95,10 @@ export class SymbolAutocompleteComponent |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}), |
|
|
}), |
|
|
switchMap((query: string) => { |
|
|
switchMap((query: string) => { |
|
|
return this.dataService.fetchSymbols(query); |
|
|
return this.dataService.fetchSymbols({ |
|
|
|
|
|
query, |
|
|
|
|
|
includeIndices: this.includeIndices |
|
|
|
|
|
}); |
|
|
}) |
|
|
}) |
|
|
) |
|
|
) |
|
|
.subscribe((filteredLookupItems) => { |
|
|
.subscribe((filteredLookupItems) => { |
|
@ -132,7 +136,11 @@ export class SymbolAutocompleteComponent |
|
|
public ngDoCheck() { |
|
|
public ngDoCheck() { |
|
|
if (this.ngControl) { |
|
|
if (this.ngControl) { |
|
|
this.validateRequired(); |
|
|
this.validateRequired(); |
|
|
this.validateSelection(); |
|
|
|
|
|
|
|
|
if (this.control.touched) { |
|
|
|
|
|
this.validateSelection(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.errorState = this.ngControl.invalid && this.ngControl.touched; |
|
|
this.errorState = this.ngControl.invalid && this.ngControl.touched; |
|
|
this.stateChanges.next(); |
|
|
this.stateChanges.next(); |
|
|
} |
|
|
} |
|
|