Fixed state issue with variable value dropdown, #2080
This commit is contained in:
@@ -34,7 +34,7 @@ function (angular, app, _) {
|
||||
var tag = { text: value, selected: false };
|
||||
_.each(vm.variable.current.tags, function(tagObj) {
|
||||
if (tagObj.text === value) {
|
||||
tag.selected = true;
|
||||
tag = tagObj;
|
||||
}
|
||||
});
|
||||
return tag;
|
||||
|
||||
@@ -138,7 +138,7 @@ function () {
|
||||
describe("Given variable with selected tags", function() {
|
||||
beforeEach(function() {
|
||||
ctrl.variable = {
|
||||
current: {text: 'server-1', value: 'server-1', tags: [{text: 'key1'}] },
|
||||
current: {text: 'server-1', value: 'server-1', tags: [{text: 'key1', selected: true}] },
|
||||
options: [
|
||||
{text: 'server-1', value: 'server-1'},
|
||||
{text: 'server-2', value: 'server-2'},
|
||||
|
||||
Reference in New Issue
Block a user