我坚持让md-autocomplete的宽度增长到相关mdInput的大小.
这是我的代码:
这是我的代码:
<div class="field"> <md-input-container class="halfWidth"> <input mdInput type="text" name="country" [(ngModel)]="model.Country" (ngModelChange)="filterCountries()" [disabled]="progress" [mdAutocomplete]="countriesAutocomplete" placeholder="Country" required /> </md-input-container> <md-autocomplete #countriesAutocomplete="mdAutocomplete" [displayWith]="getCountryName"> <md-option *ngFor="let country of countries" [value]="country" class="fullWidth"> {{ country.PersianName || country.EnglishName }} </md-option> </md-autocomplete> </div>
我使用了md-autocomplete和md-autocomplete .mat-autocomplete-panel CSS选择器,但没有结果.