This can be done by overriding the method getOptionsFromStore
for list filter without concrete (with autogenerated from grid store) store. Or you can create new component based on it
fiddle
Ext.define('Ext.grid.filters.filter.DynamicList', {
extend: 'Ext.grid.filters.filter.List',
alias: 'grid.filter.d-list',
type: 'd-list',
getOptionsFromStore: function (store) {
var me = this,
data = store.getData(),
map = {},
ret = [],
dataIndex = me.dataIndex,
labelIndex = me.labelIndex,
recData, idValue, labelValue;
if (store.isFiltered() && !store.remoteFilter ) {
data = data.getSource();
}
//each filtered records, not all
Ext.Array.each(store.getRange(),function (record) {
recData = record.data;
idValue = recData[dataIndex];
labelValue = recData[labelIndex];
if (labelValue === undefined) {
labelValue = idValue;
}
if (!map[idValue]) {
map[idValue] = 1;
ret.push([idValue, labelValue]);
}
}, null, {
filtered: true,
collapsed: true
});
return ret;
}
});