2
0
mirror of synced 2025-02-20 10:28:23 +00:00

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
parent 2db3c30a26
commit ef7a75195e
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D

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()