我希望放在嵌入式表单内的angularjs ui-select控件具有由其默认选项(或占位符,如果未定义默认选项)定义的宽度,并且在上一次选择期间不更改其宽度。
我该怎么做?
这是一个代码示例:
<form class="form-inline">
<div class="form-group">
<label>Label</label>
<ui-select ng-model="action.selected" theme="bootstrap">
<ui-select-match placeholder="Action">{{ $select.selected.email }}</ui-select-match>
<ui-select-choices repeat="action in actions | filter: $select.search ">
<div ng-bind-html="action.email | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
</div>
<div class="form-group">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
</div>
<button type="submit" class="btn btn-default">Send invitation</button>
</form>
这里是plunker