Преглед на файлове

fix(templating): fixed issue with templated dashboard and error selectOptionsForCurrentValue undefined

Torkel Ödegaard преди 10 години
родител
ревизия
aaae23e9f0
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      public/app/features/templating/templateValuesSrv.js

+ 3 - 3
public/app/features/templating/templateValuesSrv.js

@@ -80,11 +80,11 @@ function (angular, _, kbn) {
 
       if (_.isArray(variable.current.value)) {
         variable.current.text = variable.current.value.join(' + ');
-        this.selectOptionsForCurrentValue(variable);
+        self.selectOptionsForCurrentValue(variable);
       }
 
       templateSrv.updateTemplateData();
-      return this.updateOptionsInChildVariables(variable);
+      return self.updateOptionsInChildVariables(variable);
     };
 
     this.variableUpdated = function(variable) {
@@ -148,7 +148,7 @@ function (angular, _, kbn) {
       }
 
       if (_.isArray(variable.current.value)) {
-        this.selectOptionsForCurrentValue(variable);
+        self.selectOptionsForCurrentValue(variable);
       } else {
         var currentOption = _.findWhere(variable.options, { text: variable.current.text });
         if (currentOption) {