Big initialization rework in order to be able to facilitate preloaded backend settings
This commit is contained in:
@@ -4,14 +4,15 @@ export default Ember.Component.extend
|
||||
#filter_calls: 0
|
||||
tagName: 'tr'
|
||||
classNames: ['table-filters-row', 'ui', 'form']
|
||||
filters: Ember.Object.create()
|
||||
filters: null
|
||||
content: null # PagedRemoteArray from ember-cli-pagination
|
||||
key: 'name_eq'
|
||||
apply_filters: null # allow custom apply filters with application logic
|
||||
|
||||
init: ->
|
||||
@_super arguments...
|
||||
@set 'filters', @get('content.filters') unless @get('filters')
|
||||
Ember.defineProperty @, 'filter_calls', Ember.computed.alias("filters.filter_calls")
|
||||
@_super arguments...
|
||||
|
||||
actions:
|
||||
apply_filters: ->
|
||||
|
||||
@@ -4,6 +4,7 @@ export default Ember.Component.extend
|
||||
tagName: 'th'
|
||||
classNames: ['filter', 'filter-dropdown-select-multiple']
|
||||
classNameBindings: ['has_active_filter_value:active-filter', 'key']
|
||||
filters: null
|
||||
apply_filters: ->
|
||||
eager_filter: false # filter on single select
|
||||
has_active_filter_value: Ember.computed.bool 'selected.length'
|
||||
|
||||
Reference in New Issue
Block a user