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 Michał Cieślak
parent 03f4b4c98b
commit e1a94cfd84
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()