【发布时间】:2020-12-27 17:56:27
【问题描述】:
当我在国家列表下拉列表中搜索国家时,我的 Angular 应用程序使用 ngx-intl-tel-input 库移动到顶部。我想在搜索时修复下拉菜单的位置。
演示:https://stackblitz.com/edit/ngx-intl-tel-input-demo-5u5c1p?file=src%2Fapp%2Fapp.component.ts
<div style="margin: 50px">
<br>
<form #f="ngForm" [formGroup]="phoneForm">
<div class="mb-2">
<ngx-intl-tel-input
[cssClass]="'custom'"
[preferredCountries]="preferredCountries"
[enableAutoCountrySelect]="true"
[enablePlaceholder]="true"
[searchCountryFlag]="true"
[searchCountryField]="[SearchCountryField.Iso2, SearchCountryField.Name]"
[selectFirstCountry]="false"
[selectedCountryISO]="CountryISO.India"
[maxLength]="15"
[tooltipField]="TooltipLabel.Name"
[phoneValidation]="true"
[separateDialCode]="separateDialCode"
name="phone" formControlName="phone">
</ngx-intl-tel-input>
</div>
<div class="mb-2">
<button (click)="f.reset()">Reset</button>
</div>
</form>
<br>
</div>
GIF:Issue gif
【问题讨论】:
-
请添加一些你的相关代码:)(在我的电脑中,demo的位置在底部)
-
嗨,staclblitz-链接stackblitz.com/edit/…
-
问题截图ibb.co/sgqxGTX
标签: javascript html css angular