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.
出于某种原因,我需要知道用户何时从组合框中选择了值,即使它已经被选中。“选择”事件仅在用户选择未选择的项目时起作用。我在组合框或选择器的文档中没有看到任何像“itemclick”这样的事件。有任何想法吗?
ComboBox使用BoundList表示下拉列表。BoundList触发itemclick事件。您可以使用ComboBoxlistConfig配置来设置监听器:BoundList
ComboBox
BoundList
Ext.create('Ext.form.ComboBox', { // ... listConfig: { listeners: { itemclick: function(list, record) { alert(record.get('name') + ' clicked'); } } } }
查看演示。