PDA

View Full Version : ComboBox displaying properly after clicking second time



goldenka
17 Feb 2012, 8:07 AM
I have a problem with a combobox which is in the form. Firstly the form is filled with values (so the combo has the default value also). When I click on the combobox, the first time it expands little, the store is loaded and combo hides automatically. After second click combo expands correctly.

In one file I have this:


var record = store.getAt(rowIndex);
form.loadRecord(record);


And this is the form:



Ext.define('Modules.users.view.UserForm', {
extend: 'Ext.form.Panel',
alias : 'widget.userForm',

layout: {
type: 'vbox',
align: 'stretch'
},

plain: true,

items: [
{
xtype: 'hiddenfield',
name: 'id'
},
{
fieldLabel: 'Role',
name: 'roleId',
xtype: 'combo',
editable: false,
store: Ext.create('Modules.roles.store.Store'),
displayField: 'name',
valueField: 'id',
queryMode: 'local',
typeAhead: false,
triggerAction: 'all',
lazyRender: true,
emptyText: 'Select role'
},
{
fieldLabel: 'password',
name: 'password',
inputType: 'password'
}
],

buttons: [
{
text: 'Save',
action: 'save'
}]
});



Thank you for your help :)

mitchellsimoens
17 Feb 2012, 8:10 AM
What Ext JS 4 version?

goldenka
20 Feb 2012, 3:21 AM
Ext JS 4.0.7