Big initialization rework in order to be able to facilitate preloaded backend settings

This commit is contained in:
2018-11-20 12:13:10 -03:00
parent 88d5f55e90
commit fe6653442c
5 changed files with 38 additions and 17 deletions
+3 -2
View File
@@ -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'