ENH: Support table pagination (#24)

Fixes #22
This commit is contained in:
Matthew Ryan Dillon 2017-09-23 14:35:50 -07:00 committed by GitHub
parent 8309486a8a
commit 578b8daa32
11 changed files with 131 additions and 8 deletions

View file

@ -3,9 +3,12 @@ import Ember from 'ember';
const { Route } = Ember;
export default Route.extend({
model() {
return this.get('store').findAll('collection', {
include: 'project,study-location,collection-method,collection-type'
});
}
queryParams: {
page: { refreshModel: true },
},
model(params) {
const include = {include: 'project,study-location,collection-method,collection-type'};
return this.get('store').query('collection', Object.assign(params, include));
},
});