【问题标题】:Can't enter text on ui-select in angularjs 1.5.8无法在 angularjs 1.5.8 中的 ui-select 上输入文本
【发布时间】:2016-11-26 05:15:03
【问题描述】:

我有一个 ui-select 如下:

<ui-select multiple  ng-disabled="!report.scenario" ng-model="report.students">
    <ui-select-match placeholder="">{{$item.id}}</ui-select-match>
    <ui-select-choices repeat="{id: student.id} as student in CMP_PASSENGER_MASTER | filter: $select.search" refresh="refreshPassengers($select.search)" refresh-delay="300" reset-search-input="false">
        <div>{{student.fullName}}</div>
        <small>ID: {{student.id}}</small>
    </ui-select-choices>
</ui-select>

我遇到的问题是我无法在映射到此 ui-select 的输入中输入任何文本。仅当我粘贴文本(右键单击 -> 粘贴)CTRL+V 时才有效,但也不起作用。就像在 ui-select 指令中的某个时刻阻止了按键事件。

这些是我的凉亭依赖项:

"dependencies": {
    "angular": "^1.5.8",
    "bootstrap": "^3.3.7",
    "angular-cookies": "^1.4.0",
    "angular-resource": "^1.4.0",
    "angular-route": "^1.4.0",
    "angular-sanitize": "^1.4.0",
    "angular-touch": "^1.4.0",
    "underscore": "^1.8.3",
    "angular-ui-select": "^0.19.4",
    "angular-bootstrap": "^2.2.0",
    "angular-bootstrap-switch": "^0.5.1",
    "angular-ui-switch": "^0.1.1",
    "angular-xeditable": "^0.4.0",
    "angularUtils-pagination": "angular-utils-pagination#^0.11.1",
    "angular-confirm-modal": "^1.2.6"
  },

任何帮助将不胜感激。

【问题讨论】:

    标签: angularjs ui-select


    【解决方案1】:

    只是看到一件事我无法解释,那就是reset-search-input,它不应该出现在ui-select-choices 上,而应该出现在 ui-select 水龙头上。因为这将在选择一个选项后重置。尝试改变它,看看它是否有帮助。 ui-select Wiki

    【讨论】:

    • 嗨,你是对的。我移到了 ui-select,但它仍然无法正常工作。
    • 你能分享一个plunker吗?您也尝试过 19.5 版吗?
    • 在 plunkers 中我无法重现它。这是错误:github.com/angular-ui/ui-select/commit/0d81493
    【解决方案2】:

    我使用的 ui-select 0.9.4 版本存在错误。有关更多详细信息,您可以在此处阅读:github.com/angular-ui/ui-select/commit/0d81493

    我将版本降级到 0.9.3,它工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-06
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多