KendoReact Menu - Close on MenuItem Click & Portal Rendering

1 Answer 33 Views
Grid Menu Popup
Sanja Tolo
Top achievements
Rank 1
Iron
Iron
Sanja Tolo asked on 04 Feb 2025, 02:30 PM

Hi everyone,

 

I’m using the KendoReact Menu component, which opens on hover. However, I’ve noticed that when clicking on a MenuItem (in our case, we’re opening a side panel from a grid item), the menu does not automatically close. I couldn’t find any prop in the documentation that controls this behavior.

 

Additionally, I’m curious about the decision to stop rendering the menu inside a portal in versions 9+. This change impacts how the menu behaves in certain layouts.

• Is there a built-in way to make the menu close when a MenuItem is clicked?

• If not, what would be the best way to achieve this?

 

Any guidance or workarounds would be greatly appreciated!


1 Answer, 1 is accepted

Sort by
0
Yanko
Telerik team
answered on 06 Feb 2025, 02:19 PM

Hello, Sanja Tolo,

Yes, you can achieve the desired result utilizing the "ref" of the Menu and call its "onItemMouseLeave", which will close the menu within the onSelect event. Following is an example demonstrating this approach:

Please review the above approach and let me know if additional inquiries arise.

Regards,
Yanko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid Menu Popup
Asked by
Sanja Tolo
Top achievements
Rank 1
Iron
Iron
Answers by
Yanko
Telerik team
Share this question
or