I am trying to implement Ext.ux.grid.filter.ListFilter using a data store (rather than a hardcoded list) as covered here in the ExtJS 4 API. The data comes in fine and I see a filter option on this column but it just says "Loading..." where the filter options are supposed to be:
I am pretty sure I have this configured as per the API specs but have not had any luck with this. Has anyone implemented this correctly?
The store I use to get the filter options is set up like this:
// get the levels for filtering
var levelStore = Ext.create('Ext.data.Store', {
fields: ['levels'],
proxy: {
type: 'ajax',
url: '../json?queryName=levels',
reader: 'json'
},
autoLoad: true
});
I implemented the filter config in the column like so:
{
header: 'Level',
dataIndex: 'levels',
width: 160,
sortable: true,
filter: {
type: 'list',
store: levelStore
}
Some thoughts I had:
Do I need my filter option data store to have a specific column title, like "name" instead of "level"?
Is this trying to get the store options before they are loaded from ajax, and there is some unspecified way of telling it to load these filter options after the ajax is returned?
Do I need to implement my filter configuration separate from the column config to use this one? (all my other filter configurations, are done right in the column config and seem to work fine)
EDIT:
The json response looks something like this, not sure if it is causing the trouble:
[{"levels":"Level 1"},{"levels":"Level 2"},{"levels":"Level 3"}]