类型头:类型头-无结果变量更新较晚
作者: alexis-allot创建于 2016年7月16日更新于 2018年11月28日
标签type: enhancementcomponent: typeaheadPRs plz!
错误描述: 在输入将会有自动补全结果的字符串时,typeahead-no-results 变量为 true,这会让用户感到困惑。 示例: 我使用 typeahead-wait-ms 设置了 500ms 的等待时间。 1. 我输入字符串 "z"(不会返回任何结果)。 typeahead 等待 500ms,然后运行查询,然后 typeahead-no-results 变量被设置为 true,并向用户显示了我的自定义消息。 2. 用户删除字符串 "z"。 typeahead-no-results 仍然为 true,我的消息仍然显示。 3. 用户输入字符串 "a"(将产生结果)。 在 500ms 的等待时间内,由于 typeahead-no-results 仍然为 true,我的未找到的消息仍然显示。 4. 只有在向服务器发出请求时,typeahead-no-results 才会变为 false,我的消息才会隐藏。
内容来源: angular-ui/bootstrap