Skip to content

Commit

Permalink
Merge pull request #7080 from J-Michalek/feat/menu-types
Browse files Browse the repository at this point in the history
docs(menu): add show/hide events to types and docs
  • Loading branch information
tugcekucukoglu authored Jan 13, 2025
2 parents 5777f1c + 83545ed commit e77e17f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/showcase/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -40617,6 +40617,18 @@
],
"returnType": "void",
"description": "Callback to invoke when the component loses focus."
},
{
"name": "show",
"parameters": [],
"returnType": "void",
"description": "Callback to invoke when the menu popup is shown."
},
{
"name": "hide",
"parameters": [],
"returnType": "void",
"description": "Callback to invoke when the menu popup is hidden."
}
]
},
Expand Down
10 changes: 10 additions & 0 deletions packages/primevue/src/menu/Menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,16 @@ export interface MenuEmitsOptions {
* @param {Event} event - Browser event.
*/
blur(event: Event): void;
/**
* Callback to invoke when the menu popup is shown.
* @remarks Emitted when {@link MenuProps.popup} is true.
*/
show(): void;
/**
* Callback to invoke when the menu popup is hidden.
* @remarks Emitted when {@link MenuProps.popup} is true.
*/
hide(): void;
}

export declare type MenuEmits = EmitFn<MenuEmitsOptions>;
Expand Down

0 comments on commit e77e17f

Please sign in to comment.