Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi,
When trying to call trigger the 'ItemSelected' in our project I ran into an issue using the SfMenu control.
When you add a MenuEvents component beneath an SfMenu component, any event triggered by the SfMenu (be it OnOpenClose, ItemSelected, etc) throws an InvalidCastException.
Attached is a minimal example project with an SfMenu which has one parent with 2 child items.
Start by entering a valid (Syncfusion Blazor 38.x) license in Program.cs, run the project, and hover over the SfMenu in the topleft.
When hovering the (root) menu item, the menu tries triggering the 'OnOpen' event, which throws said Exception.
Do note that subscribing to any of the events is not required to trigger the exception.