PDA

View Full Version : ComboBox/Store behavior



nak1
18 Aug 2009, 4:44 AM
Guys,

I've got an odd behavior on my combobox and I was wondering if there was something I could do to resolve it. I've got a store that I'm sharing between a dataview and a combobox. When I 'select' an item in the combobox the first time, things seem to behave properly. The second time I try to select an item in the combobox, all the items (records) disappear and I can only see one record in the combobox (the one I previously selected). Since the dataview shares the same store, it's items disappear as well (except for the record that was selected).

Any thought?



{
xtype:'combo',
fieldLabel: 'Go to:',
store: obj.selector.store,
displayField: obj.combo.displayField,
valueField: obj.combo.valueField,
mode: 'local',
minListWidth: 400,
typeAhead: false,
allowBlank: true,
forceSelection: true,
tpl: template.comboTask,
width: 100,
listeners: {
'select': function(){
debugger;
}
}

18 Aug 2009, 6:21 AM
add triggerAction : 'all'

18 Aug 2009, 6:22 AM
The combo box uses a data view for it's "list box", which is the results that you see.

When you select a record (without TriggerAction : 'all'), it will filter the store based on the value selected.

This is why you see both data views being filtered.

nak1
18 Aug 2009, 7:13 AM
Once again J you pull through! I appreciate the help.

N