I have angular8
project in which i have angular material
. I am using mat-autocomplete
for input autocomplete. Here is the code of my html
<form class="example-form">
<mat-form-field class="example-full-width dummy-input-field" floatLabel="never">
<input matInput class="custom-input" placeholder="State" [matAutocomplete]="auto" [formControl]="stateCtrl">
</mat-form-field>
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let state of filteredStates | async" [value]="state.name">
<img class="example-option-img" aria-hidden [src]="state.flag" height="25">
<span>{{state.name}}</span> |
<small>Population: {{state.population}}</small>
</mat-option>
</mat-autocomplete>
</form>
Here is my complete Stackblitz Link to demonstrate my issue. There is a placeholder inside input that says 'State'. I want to position this placeholder
in the vertical middle of input like normal input boxes of Html
.
How can i change the position of angular material
input placeholder's position ?