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:
parent
03f4b4c98b
commit
e1a94cfd84
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue