Fix for selecting template variable value from typeahead using enter key, Closes #765

This commit is contained in:
Torkel Ödegaard
2014-09-06 10:05:58 +02:00
parent 6337c77532
commit e729b3734d
3 changed files with 8 additions and 4 deletions

View File

@@ -40,9 +40,9 @@ function (angular, app, _, $) {
minLength: 0,
items: 10,
updater: function(value) {
updateVariableValue(value);
$input.val(value);
$input.trigger('blur');
return '';
return value;
}
});

View File

@@ -21,7 +21,9 @@
<strong>VARIABLES</strong>
</li>
<li ng-repeat-start="variable in variables" class="grafana-target-segment template-param-name">
{{variable.name}}:
<span class="template-variable ">
${{variable.name}}:
</span>
</li>
<li ng-repeat-end template-param-selector>

View File

@@ -23,7 +23,9 @@
<table class="grafana-options-table">
<tr ng-repeat="variable in variables">
<td style="width: 1%">
[[{{variable.name}}]]
<span class="template-variable">
${{variable.name}}
</span>
</td>
<td class="max-width" style="max-width: 200px;">
{{variable.query}}