Hi, I'm trying to enable/disable a particular item of my ContextMenu inside my Grid Component. But, unfortunately, following piece of code is not working completely correct:
<GridComponent
[...]
contextMenuOpen={(args) => {
//the context menu item "openContact" should only be enabled if the current row property "contactId" is not null
this.grid.contextMenuModule.contextMenu.enableItems(["openContact"], args.rowInfo?.rowData?.contactId !== null);
}}
[...]
>
This piece of code works as long no other context menu, for example the sub-context-menu for Exports, gets hovered by the mouse. Once the sub-context-menu for Exports gets hovered by the mouse, the item is again enabled.
The context menu is looking like this:
Is there any other method to enable/disable context menu items dynamically?