[SOLVED] Reverse sort a list in Ext.List view in Sencha
So you have a sencha application with a list and you want to reverse-sort it. Using the ASC and DESC keyword is possible as in the example below. Edit the store .js file like this :
Ext.define('Tracker.store.Storepoints', {
extend: 'Ext.data.Store',
requires: ['Tracker.model.Storepoint'],
config:
{
model: 'Tracker.model.Storepoint',
autoLoad: true,
sorters: {property:'date',direction:'DESC'},
storeId: 'Storepoints',
proxy: {
type: 'localstorage',
id: 'StorePoints'
}
}
});
Recent Comments