Css 主Ng自动完成下拉列表位置不工作
我使用了,我遇到了一些冲突,当我使用这种样式时,自动完成下拉列表是采取向下的位置 图片描述在这里 有人知道如何正确地做到这一点吗 谢谢Css 主Ng自动完成下拉列表位置不工作,css,bootstrap-4,primeng,Css,Bootstrap 4,Primeng,我使用了,我遇到了一些冲突,当我使用这种样式时,自动完成下拉列表是采取向下的位置 图片描述在这里 有人知道如何正确地做到这一点吗 谢谢 <div class="col"> <div class="form-group"> <label >Please Select a Tag</label>
<div class="col">
<div class="form-group">
<label >Please Select a Tag</label>
<p-autoComplete [(ngModel)]="brand" [suggestions]="filteredBrands" (completeMethod)="filterBrands($event)" [size]="30"
[minLength]="1" placeholder="Hint: type 'Gold' or 'G'" [dropdown]="true"[style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}" class="p-autocomplete" >
<ng-template let-brand pTemplate="item">
<div class="ui-helper-clearfix" style="border-bottom:0px solid #D5D5D5">
<div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
</div>
</ng-template>
</p-autoComplete>
</div>
</div>
Hi只需从标记中删除[inputStyle]={'width':'100%}。它会很好用的。检查
您正在为输入字段提供100%的宽度,这就是图标下降的原因。希望能有帮助
.p-autocomplete{
width: 100%;
}