Graph: series override dropdown menu select did not work after recent commit that added typeahead to this dropdown

This commit is contained in:
Torkel Ödegaard
2014-10-20 10:06:34 -04:00
parent 16e7980982
commit b85fe62389
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -37,6 +37,17 @@ function (angular, app, _, $) {
return memo;
}, []);
$scope.menuItemSelected = function(optionIndex, valueIndex) {
var option = $scope.menuItems[optionIndex];
var result = {
$item: option.submenu[valueIndex],
$optionIndex: optionIndex,
$valueIndex: valueIndex
};
$scope.dropdownTypeaheadOnSelect(result);
};
$input.attr('data-provide', 'typeahead');
$input.typeahead({
source: typeaheadValues,
+1 -1
View File
@@ -23,7 +23,7 @@ define([
option.submenu = _.map(values, function(value, index) {
return {
text: String(value),
click: 'setOverride(' + option.index + ',' + index + ')'
click: 'menuItemSelected(' + option.index + ',' + index + ')'
};
});