From 255901ca7ca696ecf6ea866ee4e59a8fa2f27a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 7 Jan 2016 21:59:55 +0100 Subject: [PATCH] fix(graph panel): fixed bug in typeahead when adding series style override, fixes #3554 --- CHANGELOG.md | 3 +++ public/app/core/directives/dropdown_typeahead.js | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 850ebfee008..923498aefc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ### New Features * **Elasticsearch**: Support for derivative unit option, closes [#3512](https://github.com/grafana/grafana/issues/3512) +### Bug fixes +* **Graph Panel**: Fixed typehead when adding series style override, closes [#3554](https://github.com/grafana/grafana/issues/3554) + # 2.6.0 (2015-12-14) ### New Features diff --git a/public/app/core/directives/dropdown_typeahead.js b/public/app/core/directives/dropdown_typeahead.js index ad484bb18d7..902aaae44fa 100644 --- a/public/app/core/directives/dropdown_typeahead.js +++ b/public/app/core/directives/dropdown_typeahead.js @@ -74,11 +74,10 @@ function (_, $, coreModule) { updater: function (value) { var result = {}; _.each($scope.menuItems, function(menuItem) { - result.$item = menuItem; - _.each(menuItem.submenu, function(submenuItem) { if (value === (menuItem.text + ' ' + submenuItem.text)) { result.$subItem = submenuItem; + result.$item = menuItem; } }); });