Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望 Tokeninput 跳过帮助文本并立即搜索令牌。
我有一个非常短的令牌列表,所以我想向用户展示它们,而不是让用户尝试猜测哪些是正确的令牌可供选择。
似乎没有这个选项,所以看起来我必须破解它?
关于我需要覆盖什么方法以及如何覆盖的任何提示?
第 195 行有一个show_dropdown_hint(),这是您要替换的。
show_dropdown_hint()
您需要将其替换为populate_dropdown(query,results)and show_dropdown()。
populate_dropdown(query,results)
show_dropdown()
对于populate_dropdown()参数,您应该使用空字符串query- 因为这仅与文本中以粗体显示的字符串部分相关,结果应该是所有标记的 JSON 数组 (?)。
populate_dropdown()
query
完全没有测试,但这是一个粗略的猜测,希望你能弄清楚其他任何事情!