ExtJS 4 Combobox event for selecting selected value

旧时模样 提交于 2019-12-07 18:20:02

问题


For some reason I need to know when user has selected value from combobox even if it is already selected. "Select" event works only if user selects unselected item. I don't see any event like "itemclick" in the docs for combobox or picker. Any ideas?


回答1:


ComboBox uses BoundList for representing dropdown list. BoundList fires itemclick event. You can use ComboBox's listConfig config in order to setup BoundList listeners:

Ext.create('Ext.form.ComboBox', {
    // ...
    listConfig: {
        listeners: {
            itemclick: function(list, record) {
                alert(record.get('name') + ' clicked');
            }
        }
    }
}

Check out the demo.



来源:https://stackoverflow.com/questions/15299182/extjs-4-combobox-event-for-selecting-selected-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!