Allow filters without content target for reloading

This commit is contained in:
2018-05-26 12:04:30 -03:00
parent 6f463f2b02
commit a96da6a282
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -79,8 +79,8 @@ export default Ember.Component.extend
@send 'closeModal' unless @preventClose @send 'closeModal' unless @preventClose
confirm: -> @send('ok') confirm: -> @send('ok')
saveRecord: -> saveRecord: ->
return if @get('is_saving') return if @get('is_saving') # prevent click enthusiasts from creating to many instances or things like that
@set 'is_saving', true # prevent click enthusiasts from creating to many instances or things like that @set 'is_saving', true
model = @get("model") model = @get("model")
if typeof model.validate is 'function' if typeof model.validate is 'function'
model.validate() # validate if method exists model.validate() # validate if method exists
+1
View File
@@ -22,6 +22,7 @@ export default Ember.Component.extend
filter_calls = @incrementProperty('filter_calls') filter_calls = @incrementProperty('filter_calls')
console.log "QUERY" console.log "QUERY"
console.log query console.log query
return unless @get('content') # assume observed filters
@set 'content.page', 1 @set 'content.page', 1
@set 'content.lastPage', null @set 'content.lastPage', null
@get('content').setOtherParam?('q', query) @get('content').setOtherParam?('q', query)