如何将raprap样式应用于ng-select组件?

时间:2019-04-05 14:19:50

标签: bootstrap-4 angular-ngselect

我以前在代码中曾经有一个下拉框。我用ng-select组件替换了该下拉框。我这样做的主要原因是因为我想使现有的选择框可编辑以进行搜索。但是,在开始使用ng-select之后,选择框将覆盖整个页面。我想避免。任何想法我怎么可以应用bo​​ostrap样式。我正在使用angular 5和bootstrap 4吗?

<select class="mdb-select md-form" searchable="search here" formControlName="contactList" [compareWith]="compareResource">
<option value="" disabled>{{ 'PLACEHOLDERS.CONTACT_LIST' | translate }}</option>
<option *ngFor="let contactList of contactLists" [ngValue]="contactList">{{ contactList.name }}</option>
</select>

更改为使用ng-select后

<ng-select [searchable]="true" formControlName="contactList" [items]="contactLists" 
bindLabel="name" 
placeholder="select a contact list" [compareWith]="compareResource">
</ng-select>

不过,下拉框现在覆盖了整个页面。与以前一样,下拉菜单很小且紧凑。

感谢任何帮助 非常感谢

0 个答案:

没有答案
相关问题