update commit
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user