我已经在我的应用程序中实现了 angular-ui select2,它工作正常,但是选择框容器(在搜索上方)的呈现比下拉面板小。
我的意思是:
HTML:
<select
ui-select2="{placeholder:'Select a User', dropdownAutoWidth: true}"
class="animated slideInDown"
id="entityDropDown"
ng-model="selectedUser"
ng-options="user as user.name for user in users"
ng-change="getUserInfo(selectedUser)"> <option>Place Holder</option>
</select>
最佳答案
添加到你的构造函数参数 width
:
<select
ui-select2="{placeholder:'Select a User', dropdownAutoWidth: true, width: '100%'} >
</select>
应该可以。
关于javascript - select2 容器小于下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21612625/