最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ExtJS 4 Combobox event for selecting selected value - Stack Overflow

programmeradmin1浏览0评论

For some reason I need to know when user has selected value from bobox 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 bobox or picker. Any ideas?

For some reason I need to know when user has selected value from bobox 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 bobox or picker. Any ideas?

Share Improve this question edited Mar 11, 2013 at 13:24 Dawid Mazur asked Mar 8, 2013 at 16:50 Dawid MazurDawid Mazur 631 gold badge2 silver badges8 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11

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.

发布评论

评论列表(0)

  1. 暂无评论