New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Megamenu: popup disappears when component undergoes a re-render while expanded #6459
Comments
Interval makes the bug, try remove it. It works. |
The interval was intentional. I'm trying to show that there is a problem when the megamenu re-renders. Therefore, I set up my component to re-render every 3 seconds. This may seem like an artificial scenario, but it still represents a more general issue. In my application, the rendering of my megamenu depends on data which is fetched asynchronously, and which can be fetched at different points in time while the app is running. This results in a re-render, and it is weird behavior that the megamenu simply disappears when this data is fetched. |
We should add a real StackBlitz reproducer to this ticket. |
You can fetch demo data's from primeReact's. This may represent the situation. |
Describe the bug
If one of the menus in a megamenu is expanded while the megamenu undergoes a re-render, then
This leads to some unexpected behavior.
Reproducer
No response
PrimeReact version
10.6.3
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Menu popup should not disappear when megamenu undergoes a re-render.
The text was updated successfully, but these errors were encountered: