Allow filters without content target for reloading
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user