zheyan
zheyan

Reputation: 11

Hide dropdownlist of extjs combobox

Hi a newbie in extjs I want to ask you guys on how to hide the dropdownlist of extjs combobox onmouseout.

var combo = new ext.form.combobox({
    width: 178,
    store: store,
    displayField: 'name',
    valueField: 'value',
    triggerAction: 'all',
    emptyText: 'blank'
});
combo.applyTo('id');

Upvotes: 1

Views: 2518

Answers (1)

Igor Semin
Igor Semin

Reputation: 2496

Use mouseLeaveMonitor in event

Example:

var combo = new ext.form.combobox({
    width: 178,
    store: store,
    displayField: 'name',
    valueField: 'value',
    triggerAction: 'all',
    emptyText: 'blank',
    listeners: {
        expand: function(combo) {
            var element = combo.getPicker().el;
            combo.mouseLeaveMonitor = element.monitorMouseLeave(0, combo.collapse, combo);
        }
    }
});
combo.applyTo('id');

First agrument it's collapse interval - you can change it.

Upvotes: 2

Related Questions