From edcce00aab11d2eaaa3c0e5dcab8a3985a6b4d0a Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 3 Jun 2019 11:54:14 -0400 Subject: [PATCH] Fix multipanel history search. --- client/galaxy/scripts/mvc/history/multi-panel.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/galaxy/scripts/mvc/history/multi-panel.js b/client/galaxy/scripts/mvc/history/multi-panel.js index 7df50251f15..80157a2a5b7 100644 --- a/client/galaxy/scripts/mvc/history/multi-panel.js +++ b/client/galaxy/scripts/mvc/history/multi-panel.js @@ -835,7 +835,6 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({ /** Set up any view plugins */ setUpBehaviors: function() { this._moreOptionsPopover(); - // input to search histories this.$("#search-histories").searchInput({ name: "search-histories", @@ -850,10 +849,14 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({ }); }, onsearch: searchFor => { + const multipanel = this; this.historySearch = searchFor; this.filters = [ - () => { - return this.model.matchesAll(this.historySearch); + function() { + // This is intentionally a function where 'this' gets + // bound, applying the filter to the model of the + // caller. + return this.model.matchesAll(multipanel.historySearch); } ]; this.renderColumns(0);