feat(StatusPopupMenu): introduce `closeHandler` hook

This enables us to predefine default close handlers for popup
menus.
This commit is contained in:
Pascal Precht 2021-06-08 13:25:45 +02:00 committed by Michał Cieślak
parent a1ecb77f19
commit 6276a789c3
1 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,13 @@ Menu {
property int menuItemCount: 0
property var subMenuItemIcons: []
property var closeHandler
onClosed: {
if (typeof closeHandler === "function") {
closeHandler()
}
}
delegate: MenuItem {
id: statusPopupMenuItem