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

This commit is contained in:
Torkel Ödegaard 2015-07-30 08:07:47 +02:00
parent fb81a4f318
commit aaae23e9f0

View File

@ -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) {