PDA

View Full Version : ComboBox List wont show when form opened more than once.



ching29
31 Jul 2016, 10:00 PM
Hi,

I have a form that has a grid which column is a combobox. On first load of the form, everything works fine but when I cancel and re-opened the form the combobox list wont appear.

The image below is loaded for the first time. It shows the lists of items that has 'Basics' in it.

54867

The image below is when I re-opened the form the second time. It doesn't show the lists of items with 'Basic'.
54868

Please see my code below.



var topicGrid = Ext.create('Ext.grid.Panel', { name: 'topicGrid',
id: 'topicGrid',
store: gridTopics,
columns: [{
header: 'Topic',
dataIndex: 'topicCode',
flex: 1,
allowBlank: false,
renderer: function(topicCode) {
var index = comboTopics.find('topicCode', topicCode);
return (index === -1) ? "" : comboTopics.getAt(index).get('topicDesc');
},
editor: {
xtype: 'combobox',
store: comboTopics,
queryMode: 'local',
displayField: 'topicDesc',
valueField: 'topicCode',
forceSelection:true,
anyMatch: true,
typeAhead: true
}
}],
plugins: [rowEditing4],
listeners: {
'selectionchange': function(view, records) {
topicGrid.down('#removeEmployee').setDisabled(!records.length);
}
}
});

Gary Schlosberg
2 Aug 2016, 11:37 AM
That sounds familiar but I couldn't find a ticket for it. Are you able to recreate the issue in a runnable test case?
https://fiddle.sencha.com/#home

ching29
2 Aug 2016, 5:44 PM
Hi,

No. I haven't tried replicating it on fiddle. But I'll try and let you know the result.