下拉列表中的多行值(组合框)
是否有任何库可以使 ComboBox 在展开时选择多行选项。我在 ExtJS 中寻找类似于 Combobox 的内容,除了当用户单击向下箭头时,必须显示值,就像在正常下拉列表中一样。
有人知道是否可以用 ExtJS 做类似的事情吗?因为他们自己的社区和支持肯定不会(http://www.extjs .com/forum/showthread.php?t=94079)
Is there are any libraries to make ComboBox to select multiline options when expanded. I am looking something similar to Combobox in ExtJS except values have to appear when user clicks down arrow, like in normal dropdown.
Does someone know if its possible to do something like that with ExtJS? Because their own community and support sure doesn’t (http://www.extjs.com/forum/showthread.php?t=94079)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用模板配置 (
tpl
) 来定义下拉列表的视觉外观(这正是您从论坛帖子链接到的示例中的以下代码的作用):可以根据需要配置标准组合框(带或不带下拉按钮 - 该示例使用
hideTrigger:true
来隐藏它)。听起来您还需要triggerAction: 'all'
以便在单击下拉按钮时显示整个列表。基本上,只需确保查看 ComboBox API 文档< /a> 看看所有可用的东西——你想要的是完全标准的行为。
You can use the template config (
tpl
) to define how you want the dropdown list to look visually (which is exactly what the following code does in the example that you linked to from your forum post):You can configure a standard combo box however you want (with or without a dropdown button -- that example uses
hideTrigger:true
to hide it). Sounds like you would also wanttriggerAction: 'all'
so that the entire list is shown when you click the dropdown button.Basically, just make sure you look at the ComboBox API docs to see what all is available -- what you want is perfectly standard behavior.