diff --git a/public/app/core/directives/value_select_dropdown.js b/public/app/core/directives/value_select_dropdown.js index 8b1719c669d..a2bae1c34d3 100644 --- a/public/app/core/directives/value_select_dropdown.js +++ b/public/app/core/directives/value_select_dropdown.js @@ -122,7 +122,7 @@ function (angular, _, coreModule) { vm.selectValue = function(option, event, commitChange, excludeOthers) { if (!option) { return; } - option.selected = !option.selected; + option.selected = vm.variable.multi ? !option.selected: true; commitChange = commitChange || false; excludeOthers = excludeOthers || false; diff --git a/public/app/features/templating/editor_ctrl.ts b/public/app/features/templating/editor_ctrl.ts index 9ef5327e7cc..beed1534f5d 100644 --- a/public/app/features/templating/editor_ctrl.ts +++ b/public/app/features/templating/editor_ctrl.ts @@ -106,7 +106,7 @@ export class VariableEditorCtrl { var clone = _.cloneDeep(variable.getSaveModel()); $scope.current = variableSrv.createVariableFromModel(clone); $scope.current.name = 'copy_of_'+variable.name; - $scope.variableSrv.addVariable($scope.current); + variableSrv.addVariable($scope.current); }; $scope.update = function() {