-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Mat autocomplte not able to set value if key avialable
Ex:
I have an auto complete with nationality list, my country contains country code and value. I want to set country code If I select country from drop down and If my response is having country code ,I need to map this with my Country name in ngModel. My problem is I am mapping country code to my ngModel and I need to show Country Name on UI screen.
What is the expected behavior?
When I get key from my response I need to show the value of that key.
note: mat-option [value]="country.code" working for Select Drop down, But same behaviour not working for Autocomplete drop down.
What is the current behavior?
If My response is sending key , ngModel displaying key instead of value
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
https://stackblitz.com/edit/angular-pvqugs