【问题标题】:Clear results when typeahead value is 0当 typeahead 值为 0 时清除结果
【发布时间】:2016-02-16 20:15:25
【问题描述】:

当我删除搜索文本时,它不会触发更改。我想在有人删除他们的查询时清除结果。

我正在使用带有 typeahead-min-length: 0 的 angular-ui bootstrap typeahead

【问题讨论】:

  • 请分享一段重现问题的代码

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


【解决方案1】:

根据我的理解,我建议您使用支持 typeahead-min-length: 0 的更新后的 ui-Bootstrap 代码 .他们最近添加了对此功能的支持。 angular-ui网站还是提到最小长度应该是1。来自website:

typeahead-min-length $ (默认: 1) - 最少的字符数 需要在输入前输入。必须大于或 等于 0。

这是来自pull request 的工作插件。

http://plnkr.co/edit/JsEwGwoqckcnHMMOxVTN?p=preview

【讨论】:

    猜你喜欢
    • 2021-02-21
    • 1970-01-01
    • 2018-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-07
    • 2023-03-15
    • 2015-07-25
    相关资源
    最近更新 更多