我想控制角材料2自動完成選項面板的位置,並將此面板放置在與實際輸入的div不同的div中。控制角材料2自動完成選項面板的位置
這是我曾嘗試:
<div fxLayout="row">
<div fxFlex="50">
<form [formGroup]="formStatus.form">
<div>
<md-input-container>
<input mdInput formControlName="title" placeholder="Titre">
</md-input-container>
</div>
<div>
<md-input-container>
<input mdInput placeholder="Address" [mdAutocomplete]="auto" formControlName="address">
</md-input-container>
</div>
</form>
</div>
<div fxFlex="50" style="background-color: palegreen">
<!-- options panel should appear here in the palegreen div -->
<md-autocomplete #auto="mdAutocomplete" [displayWith]="addressFormatter">
<md-option *ngFor="let address of addresses | async" [value]="address">
{{ address.description }}
</md-option>
</md-autocomplete>
</div>
</div>
然而,選項面板仍出現正下方的輸入和它的位置似乎被綁定到輸入...
同樣的問題與日期選擇器... – balteo