PDA

View Full Version : Shouldn't Combobox reset the store filter upon change?



Izhaki
4 Apr 2011, 7:01 AM
Hi,

Here is my issue:

I'm using a modified event edit window with the calendar
On the edit window a combo has valueField and DisplayField
I search for a value (say one starts with 's') then selects it
Window is hidden due to save
When I click on another event, I will only see the correct display field if it starts with 's'
The reason for this is that the combo store is still filtered, and so findRecord(prop, value) can't find the correct value to display.


Is this the right behaviour from Combobox?

I've solved it using:


new Ext.form.ComboBox({
id: 'lecturer',
name: Ext.calendar.EventMappings.Lecturer.name,

anchor: '100%',

fieldLabel: 'Lecturer',
store: lecturersHashStore,
displayField:'name',
allowBlank: true,
forceSelection: false,
editable: true,
mode: 'local',
triggerAction: 'all',
lazyInit: false,
listeners: {
afterrender: function(component) {
component.keyNav.tab = function() {
this.onViewClick(false);
}
},
change: function() {
this.store.clearFilter();
},
}
}),