When creating a dynamic dropdown on Angular 7 at runtime, I am facing an issue where there is whitespace visible in the select options. Despite correctly binding and filling the data, this white space persists. How can I remove this blank area when binding data?
Below is the dynamically created dropdown with a name and filled values:
<div class="form-group" style="display: flex; align-items: center;margin-top:10px;margin-left:20px;">
<div *ngFor="let fil of FilterList" style="padding-bottom: 10px;margin-right: 10px;">
{{fil.controlName | slice:3:15}}
<Select id="{{fil.controlName}}" (change)="onChange($event)" class="form-control"
style="width:200px; margin-right:10px;" >
<option value="0">-Select-</option>
<option *ngFor="let fil2 of this.FilterBinddata" >
<div *ngIf="fil.controlName===fil2.filterName ">
{{fil2.reportSource}}
</div>
</option>
</Select>
<div>
</div>
</div>
</div>
Here is a visual representation of my issue: Click here
Result of discussion: View image