mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FIX: Sometimes viewing a user's action logs would reset to view all
This commit is contained in:
parent
16ff2a4715
commit
c53ddb7723
@ -30,7 +30,7 @@ export default Ember.Controller.extend({
|
||||
|
||||
showInstructions: Ember.computed.gt('model.length', 0),
|
||||
|
||||
refresh: function() {
|
||||
_refresh() {
|
||||
this.set('loading', true);
|
||||
|
||||
var filters = this.get('filters'),
|
||||
@ -65,14 +65,18 @@ export default Ember.Controller.extend({
|
||||
});
|
||||
},
|
||||
|
||||
scheduleRefresh() {
|
||||
Ember.run.scheduleOnce('afterRender', this, this._refresh);
|
||||
},
|
||||
|
||||
resetFilters: function() {
|
||||
this.set('filters', Ember.Object.create());
|
||||
this.refresh();
|
||||
this.scheduleRefresh();
|
||||
}.on('init'),
|
||||
|
||||
_changeFilters: function(props) {
|
||||
this.get('filters').setProperties(props);
|
||||
this.refresh();
|
||||
this.scheduleRefresh();
|
||||
},
|
||||
|
||||
actions: {
|
||||
@ -91,7 +95,7 @@ export default Ember.Controller.extend({
|
||||
this._changeFilters(changed);
|
||||
},
|
||||
|
||||
clearAllFilters: function() {
|
||||
clearAllFilters() {
|
||||
this.set("filterActionId", null);
|
||||
this.resetFilters();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user