使用两个列表进行颤振自动完成如何确定第一个列表的优先级
我有两个字符串列表。一个短列表和一个长列表。短列表是长列表的子集。我想在文本字段上使用自动完成功能,该字段将为我提供短列表中的所有匹配字符串,然后在这些文本字段下方提供长列表中的所有匹配字符串。我将使用startsWith。这是一个例子:
的候选名单
土豚、水牛、猫、狗、沙鼠、老虎
。长列表
土豚,食蚁兽,熊,海狸,蜜蜂,鸟,水牛,金丝雀,猫,猎豹,狗,沙鼠,老虎......
所以按“b”将从短列表中返回水牛,然后返回熊海狸蜜蜂鸟(但不是沙鼠,因为使用startsWith过滤器)。
我找不到一种方法可以通过一次调用自动完成来做到这一点。
谢谢。
I have two String lists. A short list and a long list. The short list is a subset of the long list. I want to use autocomplete on a text field that will give me all of the matching strings from the short list and then underneath these all of the matching strings from the long list. I will be using startsWith. Here is an example:
Short list
aardvark, buffalo, cat, dog, gerbil, tiger.
Long list
aardvark, ant eater, bear, beaver, bee, bird, buffalo, canary, cat, cheetah, dog, gerbil, tiger .....
So pressing "b" will return buffalo from the short list and then bear beaver bee bird (but not gerbil because of the startsWith filter).
I cannot find a way to do this with one call to autocomplete.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论