update commit

This commit is contained in:
2018-01-26 13:50:10 -03:00
parent 67fef8e184
commit 8f03d38d16
15 changed files with 169 additions and 9 deletions
+22
View File
@@ -0,0 +1,22 @@
import PagedRemoteArray from 'ember-cli-pagination/remote/paged-remote-array'
export default PagedRemoteArray.extend
a: 42
#params: {}
filters: {}
init: ->
query = @get('filters')?.toProperties() || {}
@otherParams ||= {}
@otherParams['q'] = query
#@setOtherParam('q', query) # explicitly not, init does not trigger operational callbacks
@_super arguments...
reload: ->
query = @get('filters')?.toProperties() || {}
@set 'page', 1
@set 'lastPage', null
@setOtherParam('q', query)
paramMapping:
total_pages: 'total-pages'
total_count: 'total-count'