当存在具有typeahead的多个字段时,如何关闭角度bootstrap typeahead?

时间:2017-07-10 17:18:15

标签: javascript angularjs typeahead angular-bootstrap angular-ui-typeahead

我正在使用角度引导类型。我需要在多个输入字段上输入typeahead。我可以使用一些我错过的选项吗?或者我是否需要添加一些hacky来实现这一目标?

这两个字段看起来像multiple dropdowns

<label>
     Sector&nbsp;
     <span class="restrict-dropdown-menu-small">
       <input type="text" class="form-control length-md" 
                          ng-model="customBenchmark.sector"
                          typeahead="sector for sector in customBenchmarkOptions.sectors | filter:$viewValue:$emptyOrMatch | orderBy:'toString()'"
                          typeahead-focus
                          typeahead-select-on-blur="true"/>
     </span>
</label>
<label>
      Rating&nbsp;
      <span class="restrict-dropdown-menu-small">
          <input type="text" class="form-control length-md"
                             ng-model="customBenchmark.rating"
                             typeahead="rating for rating in customBenchmarkOptions.ratings | filter:$viewValue:$emptyOrMatch | orderBy:'toString()'"
                             typeahead-focus
                             typeahead-select-on-blur="true"/>
      </span>
</label>

0 个答案:

没有答案