提前删除空格

时间:2020-07-15 14:07:42

标签: html angularjs typeahead bootstrap-typeahead

我有一个HTML页面,其中的输入使用uib-typeahead作为以下代码:

<input type="text" class="form-control" placeholder="Type the road name"
  uib-typeahead="road for road in $ctrl.roads | filter:$viewValue"
  typeahead-append-to-body="true" typeahead-show-hint="false" typeahead-select-on-blur="true"
  typeahead-editable="false" ng-model="$ctrl.road" ng-model-options="{ debounce: 500 }"
  typeahead-no-results="noRoad" typeahead-on-select="$ctrl.loadLocalNumbers($item, $model, $label, $event)"/>

当我尝试驶过包含两个或多个单词(例如“华盛顿特区”)的道路时,显示的提示似乎没有空格。 例如:名称是“ New York”,当您完成单词“ New”时,提示是“ NewYork”。 如何防止“自动修剪”? 文档在这里,但我找不到解决此问题的方法: https://angular-ui.github.io/bootstrap/versioned-docs/1.0.3/

我不能使用ui-select,因为它太深了!在此列表中,我至少有2000条道路,ui-select竞争滞后,需要花费很多时间才能打开,搜索和选择。

0 个答案:

没有答案