首页 > 解决方案 > 带有2个选择组的Angularjs下拉列表如何实现过滤器

问题描述

我有一个下拉列表,其中包含您可以在此行下看到的代码,我希望在下拉列表的第一个位置输入文本,因此如果您编写下拉列表的选项,则会被过滤。

任何想法?

 <label>Perros/Gatos (*)</label>
                        <div class="customClass">
                            <select ng-model="mascotas.type" 
                                    ui-select2="ui-select2" 
                                    required>
                                   <optgroup label="Perros">
                                    <option ng-repeat="p in perros" value="{{p.name}}">{{p.label}}</option>
                                </optgroup>
                                <optgroup label="Gatos">
                                    <option ng-repeat="g in gatos" value="{{g.name}}">{{g.label}}</option>
                                </optgroup>                           
                            </select>
                        </div>

标签: htmlangularjsdropdown

解决方案


推荐阅读