Hey guys,
I am working on a customised contextMenu.
I want to disable some menu item based on a condition.
as an example, in the above image, is there any way to disable the Edit event.
Still want to show it but as a disabled menu item. So user can see that it was disabled.
eventContextMenu: {
processItems: ({ items }) => {
(items.deleteEvent = false),
(items.unassignEvent = false),
(items.editEvent = false);
},
items: [
{
text: 'Edit event',
icon: 'icon proicon-pencil-16',
onItem: ({ item }) => console.log(item.text),
},
{
text: 'Find next available resource',
icon: 'icon proicon-search-16',
onItem: ({ item }) => console.log(item.text),
},
{
text: 'Show event on map',
icon: 'icon proicon-map-pin-square-16',
onItem: ({ item }) => console.log(item.text),
},
{
text: 'Drill to event',
onItem: ({ eventRecord }) => drillBackTo(eventRecord, 'EVENT'),
},
{
text: 'Drill to customer',
onItem: ({ eventRecord }) =>
drillBackTo(eventRecord.data.customerCode, 'CUSTOMER'),
},
],
},
Is there any property or something which can make the menu item disabled.
Thanks in advance.