'Material Autocomplete with FormGroup
I have a formGroup that uses the Material Autocomplete component/input to select a Customer with a name and ID. I am able to select and POST fine. How do I load the Customer name in the same Autocomplete component on a GET by providing the ID from the formGroup?
<input type="text" placeholder="Enter Name" matInput [matAutocomplete]="auto"
formControlName="MarinaCustomerId">
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayFunction"
(optionSelected)="getCustomerVessels();resetVessel()">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option">
<span>{{option.LastName + ', ' + option.FirstName}}</span>
</mat-option>
</mat-autocomplete>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
