Skip to content

Commit

Permalink
work for #8129 Popup submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed May 16, 2024
1 parent bb358b0 commit 87e308c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/actions/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export interface IAction {
items?: Array<IAction>;
markerIconName?: string;
markerIconSize?: number;
showPopup?: () => void;
hidePopup?: () => void;
}

export interface IActionDropdownPopupOptions extends IListModel, IPopupOptionsBase {
Expand Down Expand Up @@ -399,11 +401,6 @@ export class Action extends BaseAction implements IAction, ILocalizableOwner {
);
popupModel.cssClass = "sv-popup-inner";
this.popupModel = popupModel;
const originalAction = this.action;
this.action = (context?: any, isUserAction?: boolean) => {
if (!!originalAction) originalAction(context, isUserAction);
this.hidePopup();
};
}

location?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class ListModel<T extends BaseAction = Action> extends ActionContainer<T>
itemValue.hidePopup();
});
} else if (!!action.popupModel && action.popupModel.isVisible) {
itemValue.hidePopup();
action.hidePopup();
}
});
}
Expand Down

0 comments on commit 87e308c

Please sign in to comment.