Fix digest issue with query part editor's actions menu (#21834)

This commit is contained in:
Dominik Prokop 2020-01-30 09:13:22 +01:00 committed by GitHub
parent 0fd088c757
commit 1ef91e3fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import _ from 'lodash';
import $ from 'jquery';
import coreModule from 'app/core/core_module';
import { promiseToDigest } from '../../utils/promiseToDigest';
const template = `
<div class="dropdown cascade-open">
@ -138,9 +139,11 @@ export function queryPartEditorDirective(templateSrv: any) {
}
$scope.showActionsMenu = () => {
$scope.handleEvent({ $event: { name: 'get-part-actions' } }).then((res: any) => {
$scope.partActions = res;
});
promiseToDigest($scope)(
$scope.handleEvent({ $event: { name: 'get-part-actions' } }).then((res: any) => {
$scope.partActions = res;
})
);
};
$scope.triggerPartAction = (action: string) => {