Twitter Typeahead.js:点击/聚焦时显示所有选项 [英] Twitter Typeahead.js: show all options when click/focus
本文介绍了Twitter Typeahead.js:点击/聚焦时显示所有选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在自动完成文本输入中使用 Typeahead.js,它很棒.但是当输入获得焦点时,我需要使用所有可用选项激活下拉菜单.我见过的每个可能的解决方案都涉及用一些值初始化输入,但我需要显示所有选项.
I'm using Typeahead.js in an autocomplete text input, and it's great. But I need to activate the dropdown menu with all the available options when the input gets focus. Every possible solution I've seen involves initializing the input with some value, but I need to show all the options.
我怎样才能做到这一点?
How could I achieve this?
推荐答案
您需要使用选项 minLength: 0
注意:
有一个 pull request 解决了这个问题
There's a pull request which solved this issue
这篇关于Twitter Typeahead.js:点击/聚焦时显示所有选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文