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
9982c3df52
commit
2427fa2dee
|
@ -16,8 +16,15 @@ Menu {
|
||||||
|
|
||||||
property int menuItemCount: 0
|
property int menuItemCount: 0
|
||||||
property var subMenuItemIcons: []
|
property var subMenuItemIcons: []
|
||||||
|
property var openHandler
|
||||||
property var closeHandler
|
property var closeHandler
|
||||||
|
|
||||||
|
onOpened: {
|
||||||
|
if (typeof openHandler === "function") {
|
||||||
|
openHandler()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (typeof closeHandler === "function") {
|
if (typeof closeHandler === "function") {
|
||||||
closeHandler()
|
closeHandler()
|
||||||
|
|
Loading…
Reference in New Issue