feat(StatusPopupMenu): introduce `openHandler`

Similar to `closeHandler`, StatusPopupMenu can now have a customized `openHandler`
to run custom logic on open.
This commit is contained in:
Pascal Precht 2021-06-15 16:04:41 +02:00 committed by Pascal Precht
parent 9982c3df52
commit 2427fa2dee
1 changed files with 7 additions and 0 deletions

View File

@ -16,8 +16,15 @@ Menu {
property int menuItemCount: 0
property var subMenuItemIcons: []
property var openHandler
property var closeHandler
onOpened: {
if (typeof openHandler === "function") {
openHandler()
}
}
onClosed: {
if (typeof closeHandler === "function") {
closeHandler()