css - PrimeNG 使用 inputStyleClass 自动完成

标签 css angular primeng primeng-dropdowns

我正在使用 primeNG 自动完成并添加了 inputStyleClass="form-control"..问题是图标转到下一行..见下图

enter image description here

Itt 应该在方框旁边对齐,我该怎么做?

HTML

   <div class="form-group col-xs-3 col-md-3"
                                      [ngClass]="{
                                     'has-error':(ersaForm.get('gatewayRole').touched || ersaForm.get('gatewayRole').dirty ) &&
                                     !ersaForm.get('gatewayRole').valid
                                     }">
                                    <label for="gatewayRoleId" class="control-label">Gateway Role</label>
                                    <p-autoComplete  [suggestions]="iRole"  formControlName="Role"    inputStyleClass="form-control" id="RoleId" placeholder="Role (required)" (completeMethod)="searchRole($event)" [style]="{'width':'85%'}" [inputStyle]="{'width':'85%'}" field="name" dataKey="id" [dropdown]="true"></p-autoComplete>

                                </div>

最佳答案

只需要将其添加到我的自动完成中:

formControlName="phone" [style]="{'width': '100%','display': 'inline-flex','height':'34px'}"

  <p-autoComplete  [suggestions]="iRole"  formControlName="Role"    [spellcheck]="true" inputStyleClass="form-control"  id="RoleId" placeholder="Role (required)" (completeMethod)="searchRole($event)"  [style]="{'width': '100%','display': 'inline-flex','height':'34px'}"  field="name" dataKey="id" [dropdown]="true"></p-autoComplete>

关于css - PrimeNG 使用 inputStyleClass 自动完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52304120/

相关文章:

javascript - 手动加载我自定义的节点模块(Angular 4.x)

html - 在CSS中设置高度后垂直居中 anchor 标记文本

html - 在悬停状态下显示的图像上的文字

javascript - primeng <p-dropdown> 获取之前选择的值

angular - 无法读取 null 的属性 'outlets'

angular - 如何在拖动ngx-datatable的列时滚动水平滚动条,Angular4

primeng - 如何使用primeng添加条件工具提示?

css - 选择X个元素,跳过X个,选择X个元素

javascript - 脚本和样式未在 functions.php 中排队

angular - 循环到 Typescript 中的对象