Skip to content

Instantly share code, notes, and snippets.

@thenormalsquid
Created March 31, 2015 20:27
Show Gist options
  • Save thenormalsquid/d0e09e4d23db82eec118 to your computer and use it in GitHub Desktop.
Save thenormalsquid/d0e09e4d23db82eec118 to your computer and use it in GitHub Desktop.
store
Ext.define('SkyNet.store.ActiveResidentsStore', {
extend: 'Ext.data.Store',
config: {
model: 'SkyNet.model.Resident',
sorters: 'LastName',
storeId: 'ActiveResidentsStore',
autoload: true,
grouper: {
groupFn: function (record) {
return record.get('LastName')[0];
}
},
proxy: {
type: "ajax",
url: "/api/Resident?active=active",
reader: {
type: "json"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment