From fb1ba19953040a68d4627c0aa9b6abcf1b836d91 Mon Sep 17 00:00:00 2001 From: Jessica Forrester Date: Wed, 2 Sep 2015 16:34:36 -0400 Subject: [PATCH] Add a public method for adding an active filter --- labelFilter.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/labelFilter.js b/labelFilter.js index 3b8abba..0e47ad8 100644 --- a/labelFilter.js +++ b/labelFilter.js @@ -267,8 +267,7 @@ angular.module('kubernetesUI') self._labelFilterAddBtn.addClass("disabled").prop('disabled', true); // show the filtering active indicator and add the individual filter to the list of active filters - self._labelFilterActiveElement.show(); - self._addActiveFilter(key, operator, values); + self.addActiveFilter(key, operator, values); }); // If we are transitioning scenes we may still have filters active but be re-creating the DOM for the widget @@ -280,7 +279,10 @@ angular.module('kubernetesUI') } }; - + LabelFilter.prototype.addActiveFilter = function(key, operator, values) { + this._labelFilterActiveElement.show(); + this._addActiveFilter(key, operator, values); + } LabelFilter.prototype._addActiveFilter = function(key, operator, values) { var filter = this._labelSelector.addConjunct(key, operator, values);