UI-Select 在 aspnet样板(MVC & AngularJs)中使用 gurayyarar AdminBSB Material 主题时焦点错位



我正在尝试在MVC5&AngularJs。该模板使用基于AdminBSB材质的主题。但它表现得很尴尬。当我单击以选择任何项目时,它将下降并显示列表。选择后,它将返回。如图所示

以下是我的代码:

<div class="col-md-4 pull-left">
<label style="margin-top:-10px;float:left; width:100%; font-size: 13px;font-weight: normal;color: #aaabaf;">
@L("Customer")
<ui-select ng-model="vm.selectedCustomer" theme="bootstrap">
<ui-select-match placeholder="Select a customer">{{$select.selected.name}}</ui-select-match>
<ui-select-choices position='down' repeat="item in vm.customersList | filter: $select.search">
<div ng-bind-html="item.name | highlight: $select.search"></div>
<small ng-bind-html="item.code | highlight: $select.search"></small>
</ui-select-choices>
</ui-select>
</label>

试图找出是哪个脚本在做这件事,但失败了。有人帮我搞定

终于拿到了!只需要在我的ui选择配置中将appendToBody选项更改为false,如下所示:

app.config(['uiSelectConfig', function (uiSelectConfig) {
uiSelectConfig.theme = 'bootstrap';
uiSelectConfig.resetSearchInput = true;
uiSelectConfig.appendToBody = false;
}]);

最新更新