Skip to content

Commit

Permalink
Fix dashboard infinite scrolling/pagination
Browse files Browse the repository at this point in the history
Fixes #2253
  • Loading branch information
taylortom authored and tomgreenfield committed Apr 8, 2019
1 parent 539d0ab commit bd16cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/src/modules/projects/views/projectView.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ define(function(require) {

deleteProject: function(event) {
this.model.destroy({
success: _.bind(this.remove, this),
success: _.bind(function() {
Origin.trigger('dashboard:refresh');
this.remove();
}, this),
error: function(model, response, options) {
_.delay(function() {
Origin.Notify.alert({ type: 'error', text: response.responseJSON.message });
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/projects/views/projectsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define(function(require){
this._onResize = _.bind(_.debounce(this.onResize, 250), this);

this.listenTo(Origin, {
'window:resize': this._onResize,
'window:resize dashboard:refresh': this._onResize,
'dashboard:dashboardSidebarView:filterBySearch': function(text) { this.doFilter(text) },
'dashboard:dashboardSidebarView:filterByTags': function(tags) { this.doFilter(null, tags) },
'dashboard:sort:asc': function() { this.doSort('asc'); },
Expand Down

0 comments on commit bd16cca

Please sign in to comment.