I have a list filter for one of my grid's columns. When I open the filter, the list is unsorted.
What I've tried is to attach a store to that filter and sort the store. Although the store is sorted, the filter show unsorted items.
This is my view model:
Ext.define('MyApp.view.myview.TestGridModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.test-grid',
stores: {
test: {
type: 'test'
},
business: {
source: '{test}',
sorters: {
property: 'business',
direction: 'ASC'
}
},
other:{
type: 'other'
}
}
});
And bellow is a snippet from my view, where I configure store for filter:
bind: {
store: '{test}'
},
plugins: 'gridfilters',
columns: [{
text: 'Id',
dataIndex: 'id'
}, {
text: 'Business',
dataIndex: 'business',
flex: 2,
filter: {
type: 'list',
store: '{business}'
//store: '{other}'
}
}, {
text: 'Profile',
dataIndex: 'profile',
flex: 2
}, {
text: 'Program',
dataIndex: 'program',
I've also created a fiddle. Note that I need a store and not a config.
How to sort a grid filter?
Thank you