primereact
primereact copied to clipboard
Panelmenu: Problem with Callbacks "onShow" and "onHide"
Describe the bug
The defaultProps defined in panelmenu.js: {onOpen: null, onClose: null} do not match the interface PanelMenuProps defined in panelmenu.d.ts: {onShow?(event: PanelMenuHeaderItemClickEvent): void; onHide?(event: PanelMenuHeaderItemClickEvent): void;}, causing errors and rendering these callback functions unusable.
The two functions "onOpen" and "onClose" also work only in the main menu, but not in the submenu.
Reproducer
No response
PrimeReact version
10.6.6
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.
https://stackblitz.com/edit/vitejs-vite-nbpegz?file=src%2FApp.tsx
You are right the TypeScript is wrong and docs are wrong its onOpen and onClose not onShow and onHide
Thank you