Skip to content

Commit

Permalink
display drilldown count in embeddable edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Mar 11, 2020
1 parent 4a4766e commit 0c14ff0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { UiActionsDynamicActionManager } from '../../../../../plugins/ui_actions
import { Adapters } from '../types';
import { IContainer } from '../containers/i_container';
import { ViewMode } from '../types';
import { EmbeddableActionStorage } from './embeddable_action_storage';

export interface EmbeddableInput {
viewMode?: ViewMode;
Expand Down Expand Up @@ -60,7 +59,6 @@ export interface IEmbeddable<
I extends EmbeddableInput = EmbeddableInput,
O extends EmbeddableOutput = EmbeddableOutput
> {
actionStorage: EmbeddableActionStorage;
/**
* Is this embeddable an instance of a Container class, can it contain
* nested embeddables?
Expand Down
14 changes: 9 additions & 5 deletions src/plugins/embeddable/public/lib/panel/embeddable_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,15 @@ export class EmbeddablePanel extends React.Component<Props, State> {
if (this.embeddableRoot.current) {
this.props.embeddable.render(this.embeddableRoot.current);
}
this.props.embeddable.actionStorage.count().then(drilldownCount => {
if (this.mounted) {
this.setState({ drilldownCount });
}
});

const dynamicActions = this.props.embeddable.dynamicActions;
if (dynamicActions) {
dynamicActions.count().then(drilldownCount => {
if (this.mounted) {
this.setState({ drilldownCount });
}
});
}
}

closeMyContextMenuPanel = () => {
Expand Down

0 comments on commit 0c14ff0

Please sign in to comment.