mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
graph: fixes click after scroll in series override menu
Makes changes to dropdown-typeahead2 so that a css class for the button can be passed in. Means it can be used instead of dropdown-typeahead. Switches to using dropdown-typeahead2 for series_overrides directive and for the influxdb, mysql and postgres datasources as it already contains a fix for this issue. This commit also fixes the index property which was set using an incorrectly spelled length property in the series_overrides directive. Closes #15621
This commit is contained in:
@@ -128,7 +128,7 @@ export function dropdownTypeahead2($compile) {
|
||||
'<input type="text"' + ' class="gf-form-input"' + ' spellcheck="false" style="display:none"></input>';
|
||||
|
||||
const buttonTemplate =
|
||||
'<a class="gf-form-input dropdown-toggle"' +
|
||||
'<a class="{{buttonTemplateClass}} dropdown-toggle"' +
|
||||
' tabindex="1" gf-dropdown="menuItems" data-toggle="dropdown"' +
|
||||
' ><i class="fa fa-plus"></i></a>';
|
||||
|
||||
@@ -137,9 +137,15 @@ export function dropdownTypeahead2($compile) {
|
||||
menuItems: '=dropdownTypeahead2',
|
||||
dropdownTypeaheadOnSelect: '&dropdownTypeaheadOnSelect',
|
||||
model: '=ngModel',
|
||||
buttonTemplateClass: '@',
|
||||
},
|
||||
link: ($scope, elem, attrs) => {
|
||||
const $input = $(inputTemplate);
|
||||
|
||||
if (!$scope.buttonTemplateClass) {
|
||||
$scope.buttonTemplateClass = 'gf-form-input';
|
||||
}
|
||||
|
||||
const $button = $(buttonTemplate);
|
||||
const timeoutId = {
|
||||
blur: null,
|
||||
|
||||
Reference in New Issue
Block a user