Component: Menu logs error in jest when using [popup]=true and the toggle($event) method #16812
Labels
Resolution: Help Wanted
Issue or pull request requires extra help and feedback
Milestone
Describe the bug
I'm still trying to come up with the most simple reproducible case. However, it appears that
menu.toggle($event)
now requires an event object that includes thecurrentTarget
property (only when using[popup]="true"
). This change appears to have been made between[email protected]
(no error) and[email protected]
(started getting an error). It also seems to not be happening in Chrome but it is happening in Jest; which I'm not sure why but still looking at the source as to why.The toggle method requires an event as it is documented here https://primeng.org/menu#api.menu.methods.toggle. However, as a developer, it doesn't feel like it should be required or if it really needs something the toggle method should be more specific than a generic "Event".
Doing this in Jest, we are getting this error:
Environment
[email protected]
Reproducer
No response
Angular version
17.3.7
PrimeNG version
18.17.12
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.17.0
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: