首页 > 解决方案 > 如何将标签与 ui-select 链接

问题描述

<div class="form-group">
    <label for="fieldset" class="col-md-3>Collection</label>
    <div class="col-md-7">
        <ui-select name="fieldset" id="fieldset" ng-model="form.fieldset" theme="bootstrap" ng-disabled="disabled" ng-required="true">
            <ui-select-match placeholder="Select Collection">{{$select.selected.name}}</ui-select-match>
                <ui-select-choices repeat="collection.id as collection in collections | filter:$select.search">{{collection.name}}</ui-select-choices>
        </ui-select>
    </div>
</div>

单击标签时,ui-select 应该被激活,就像文本输入字段被突出显示一样。在这种情况下,在标签中使用 for 属性不起作用。点击标签时如何获得下拉菜单的焦点?

标签: phphtmlangularjsbootstrap-4ui-select

解决方案


推荐阅读