mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fixes error with saving hidden metrics (#10220)
* fixing pie chart tooltip custom label bug * fixing the bug thomas found
This commit is contained in:
parent
e2cd8ee191
commit
686a70944e
1 changed files with 11 additions and 0 deletions
|
@ -142,6 +142,16 @@ uiModules
|
|||
applyClassNames();
|
||||
});
|
||||
|
||||
function updateVisAggs() {
|
||||
const enabledState = $scope.editableVis.getEnabledState();
|
||||
const shouldUpdate = enabledState.aggs.length !== $scope.vis.aggs.length;
|
||||
|
||||
if (shouldUpdate) {
|
||||
$scope.vis.setState(enabledState);
|
||||
$scope.editableVis.dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.$watch('vis', prereq(function (vis, oldVis) {
|
||||
const $visEl = getVisEl();
|
||||
if (!$visEl) return;
|
||||
|
@ -157,6 +167,7 @@ uiModules
|
|||
}));
|
||||
|
||||
$scope.$watchCollection('vis.params', prereq(function () {
|
||||
updateVisAggs();
|
||||
if ($scope.renderbot) $scope.renderbot.updateParams();
|
||||
}));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue