When I select an item in the following matAutocomplete formControl, I always get the ID, instead of the value, shown in the drop-down.
When I change [value]="baseCoin.ID" to [value]="baseCoin.Abbr", the correct string is shown when I select an item, however, I need the (ngModelChange) event to return the baseCoin.ID to a method, instead of the baseCoin.Abbr.
<mat-form-field>
<input matInput placeholder="Base Coin" aria-label="Base Coin" [matAutocomplete]="basecoin" [formControl]="baseCoinCtrl" [(ngModel)]="newTrade.BaseCoin.Abbr" (ngModelChange)="populateMarketCoins( $event )">
<mat-autocomplete #basecoin="matAutocomplete">
<mat-option *ngFor="let baseCoin of filteredBaseCoins | async" [value]="baseCoin.Abbr">
{{baseCoin.Abbr | uppercase}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
Am I missing something?
Help is appreciated. Thanks.