I can't register any events on my Menu Bar

I even tried to use the example from the documentation: 

But i get these kind of error messages, no matter what i do (when i remove the MenuEvents ChildComponent it works):


This is my current code:




3 Replies 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team October 5, 2020 08:16 AM UTC

Hi Sascha , 
 
Sorry for the inconvenience caused. 
 
We have checked your reported problem with Menu component. In our latest we have changed event arguments as strongly type. Could you please find the below code snippet. 
 
 
@using Syncfusion.Blazor.Navigations 
 
<SfMenu TValue="MenuItem"> 
    <MenuItems> 
        <MenuItem Text="File" IconCss="em-icons e-file"> 
            <MenuItems> 
                <MenuItem Text="Open" IconCss="em-icons e-open"></MenuItem> 
                <MenuItem Text="Save" IconCss="em-icons e-save"></MenuItem> 
                <MenuItem Separator="true"></MenuItem> 
                <MenuItem Text="Exit" ></MenuItem> 
            </MenuItems> 
        </MenuItem> 
    </MenuItems> 
    <MenuEvents OnOpen="Open" TValue="MenuItem"></MenuEvents> 
</SfMenu> 
 
 
@code { 
 
    private void Open(BeforeOpenCloseMenuEventArgs<MenuItem> args) 
    { 
 
    } 
 
} 
 
 
For your reference, we have prepared a sample based on this, please refer below link. 
 
 
Please, refer the following links to know more about SF Blazor Menu Bar component    
   
 
Please note that we have introduced several API break in this release. We would like you to review the breaking changes from the below location before you upgrade. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Mohankumar R 


Marked as answer

SS Sascha Siebrecht October 6, 2020 06:47 PM UTC

Oh well, seems like i tried the wrong type of argument.
This works, thank you :*


MK Mohan Kumar Ramasamy Syncfusion Team October 7, 2020 06:47 AM UTC

Hi Sascha ,   
  
Thanks for the update.  
 
We are happy to hear that your requirement has been fulfilled. Please feel free to contact us if you need any further assistance on this. 
 
Regards, 
Mohankumar R 


Loader.
Up arrow icon