angular - Material autocomplete issue -
in angular 4 application have implemented autocomplete using mdautocomplete, works can't navigate dropdown keyboard , if scroll page see dropdown unlinked field. 
i follow guide: https://material.angular.io/components/autocomplete/overview
but mine loads data on model change call.
<div class="row"> <div class="col-lg-4"> <div class="form-group label-floating"> <md-form-field> <input mdinput placeholder="{{'customer.detail.labels.country' | translate }}" [mdautocomplete]="tdauto" name="country" #country="ngmodel" [(ngmodel)]="selected.country" (ngmodelchange)="searchcountry($event)"> </md-form-field> <md-autocomplete #tdauto="mdautocomplete" [displaywith]="displayfn"> <md-option (onselectionchange)="setcountry(country)" *ngfor="let country of countries" [value]="country"> <div class="row"> <img src="assets/img/flags24/{{country.alpha2code | lowercase}}.png"/> <span>{{country.name}} ({{country.alpha2code}})</span> </div> </md-option> </md-autocomplete> </div> </div>
Comments
Post a Comment