Hello, guys, I'm making an application that is using combo box but the problem is that when ever I try to expand the combo box it does not expands. Please tell me what is it that I'm doing wrong.
Here is the code for Combobox
Code:
Ext.define('TutorialApp.view.main.Image', {
extend: 'Ext.panel.Panel',
xtype: 'imageStorealias',
items: [
{
xtype: 'combo',
width: 145,
itemId: 'activityCombobox',
cls: 'activityCombobox',
store: {
xtype: 'store',
fields: [ 'name', 'value' ],
data: [ {
name: "5 minutes",
value: 5
}, {
name: '15 minutes',
value: 15
}, {
name: "60 minutes",
value: 60
}, {
name: "360 minutes",
value: 360
} ]
},
queryMode: 'local',
displayField: 'name',
valueField: 'value',
value: 60,
editable: false,
listeners: {
change: 'onChangedActivityPeriod',
afterrender: function( cmp ) {
// debugger;
var input = cmp.getEl().down('#' + cmp.getInputId());
input.dom.readOnly = true;
input.on('focus', function() {
//on firefox this blurs also popup, so it's unusable. better have blinking cursor than unusable field
if ( !Ext.browser.is.Firefox ) this.blur();
});
Ext.fly(document.body).on("click", function( e ) {
if ( !Ext.fly(e.getTarget()).findParent(".activityCombobox") ) {
cmp.collapse()
}
});
}
}
} ],
});