ContextMenuEvents component is missing

I'm update the syncfusion.blazor to version 18.3.0.42  I got some errors

Severity Code Description Project File Line Suppression State
Error Found markup element with unexpected name 'ContextMenuEvents'. If this is intended to be a component, add a @using directive for its namespace.
I have import this @using Syncfusion.Blazor.Navigations in my component but this ContextMenuEvents can't be found. 
Am I doing something wrong? thank you

1 Reply 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team October 26, 2020 06:46 AM UTC

Hi Truong 
 
Sorry for the inconvenience caused.  
 
In our latest version (v18.3.35), we have included some breaking changes in Context Menu component. We would like you to review the breaking changes from the below location before you upgrade.

 
You can use the MenuEvents instead of ContextMenuEvents . Please find the below code snippet for reference. 
 
 
<div class="control-section"> 
    <div class="contextmenu-control"> 
        <div id="contextmenutarget">Right click/Touch hold to open the ContextMenu</div> 
        <SfContextMenu Target="#contextmenutarget" Items="@MenuItems"> 
            <MenuEvents OnOpen="OnOpenSingle" Opened="OpenedSingle" TValue="MenuItem"></MenuEvents> 
        </SfContextMenu> 
    </div> 
</div> 
@code{ 
 
    private void OnOpenSingle(BeforeOpenCloseMenuEventArgs<MenuItem> args) 
    { 
 
    } 
    private void OpenedSingle(OpenCloseMenuEventArgs<MenuItem> args) 
    { 
 
    } 
} 
 
For your reference, we have prepared a sample based on this, please refer below link. 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Mohan kumar R 


Marked as answer
Loader.
Up arrow icon