I have a xtype:'combo' which looks like this:
xtype: 'combo',
id: 'records_list_author_id',
emptyText: 'Filter By author',
editable: false,
store: 'FilterRecordsByAuthor',
displayField: 'firstname',
valueField: 'id',
lastQuery: '',
triggerAction: 'all',
queryMode: 'local',//'remote',
typeAhead: false,
width: 200
I use very simple story with proxy defined as this:
proxy: {
type: 'ajax',
actionMethods: 'POST',
api: {
read: g_settings.baseUrl + 'index.php/record/getAuthorsOfRecords'
},
reader: {
type: 'json',
root: 'data',
idProperty: 'id',
successProperty: 'success'
//totalProperty: 'totalCount'
}
}
and in my controller I have this:
var comboBoxFilterByAuthorSt = this.getFilterRecordsByAuthorStore();
comboBoxFilterByAuthorSt.clearFilter(true);
comboBoxFilterByAuthorSt.filter ({
filterFn: function(item) {
return item.get('category_id') == sel.raw.categoryId;
}
})
So for example when I have sel.raw.categoryId = 1
it matches records with 2 different authors in my store, but in the combobox I get only one of the names. In other cases I also get uncorrect result. I checked my sql query and it works OK and returns the correct info, but when I filter the store I don't get matches I know they exist. Maybe the problem is somewhere else, but maybe I miss something when making the filters. So - any advice is appreciated.
Thanks
Leron