Dawid Mazur
Dawid Mazur

Reputation: 63

ExtJS 4 Combobox event for selecting selected value

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?

Upvotes: 3

Views: 14649

Answers (1)

Molecular Man
Molecular Man

Reputation: 22386

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.

Upvotes: 11

Related Questions