Skip to content

Commit

Permalink
refactor: 💡 revert addTriggerAction() change
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 15, 2020
1 parent 7772ba6 commit 1bad7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/plugins/ui_actions/public/service/ui_actions_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ export class UiActionsService {
triggerId: TType,
// The action can accept partial or no context, but if it needs context not provided
// by this type of trigger, typescript will complain. yay!
action:
| (ActionByType<AType> & Action<TriggerContextMapping[TType]>)
| ActionDefinition<ActionContextMapping[AType]>
action: ActionByType<AType> & Action<TriggerContextMapping[TType]>
): void => {
if (!this.actions.has(action.id)) this.registerAction(action);
this.attachAction(triggerId, action.id);
Expand Down
7 changes: 3 additions & 4 deletions x-pack/plugins/embeddable_enhanced/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ export class EmbeddableEnhancedPlugin
public setup(core: CoreSetup<StartDependencies>, plugins: SetupDependencies): SetupContract {
this.setCustomEmbeddableFactoryProvider(plugins);

plugins.advancedUiActions.addTriggerAction(
PANEL_NOTIFICATION_TRIGGER,
new PanelNotificationsAction()
);
const panelNotificationAction = new PanelNotificationsAction();
plugins.advancedUiActions.registerAction(panelNotificationAction);
plugins.advancedUiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, panelNotificationAction.id);

return {};
}
Expand Down

0 comments on commit 1bad7d2

Please sign in to comment.