Skip to content

Commit 52e2091

Browse files
committed
fix(): fixed issue with series override color selector when using the mouse to select color option, fixes grafana#4620
1 parent 1a29a76 commit 52e2091

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

public/app/core/services/popover_srv.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ function popoverSrv($compile, $rootScope) {
4646
drop.on('close', () => {
4747
popoverScope.dismiss({fromDropClose: true});
4848
destroyDrop();
49+
if (options.onClose) {
50+
options.onClose();
51+
}
4952
});
5053

51-
drop.open();
54+
setTimeout(() => { drop.open(); }, 10);
5255
};
5356
}
5457

public/app/plugins/panel/graph/series_overrides_ctrl.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ define([
6060
template: '<gf-color-picker></gf-color-picker>',
6161
model: {
6262
colorSelected: $scope.colorSelected,
63+
},
64+
onClose: function() {
65+
$scope.ctrl.seriesOverrideChanged();
6366
}
6467
});
6568
};

public/test/specs/seriesOverridesCtrl-specs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ define([
2222
ctx.scope.ctrl = {
2323
refresh: sinon.spy(),
2424
render: sinon.spy(),
25+
seriesOverrideChanged: sinon.spy(),
2526
seriesList: []
2627
};
2728
ctx.scope.render = function() {};

0 commit comments

Comments
 (0)