I am trying to control the position of the autofill options panel for material angular material 2 and put this panel in a separate div from the div of the actual input.
Here is what I tried:
<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">
<md-autocomplete #auto="mdAutocomplete" [displayWith]="addressFormatter">
<md-option *ngFor="let address of addresses | async" [value]="address">
{{ address.description }}
</md-option>
</md-autocomplete>
</div>
</div>
However, the options bar is still displayed right below the input, and its position is apparently related to the input position ...
source
share