Our pure JavaScript Scheduler component


Post by sanid »

I am trying to modify context menu for Resources (Scheduler 3.1.3 v) but its not applied to Scheduler.

Events (eventContextMenuFeature) and Scheduler (scheduleContextMenuFeature) produce context Menus with correct items but last one doesnt?

    [eventContextMenuFeature]="eventsContextConfig" 
    [scheduleContextMenuFeature]="menuConf"
    [contextMenuFeature]="contextMenuConf"
  contextMenuConf = {
    items: {
      movv : {
        text : 'TEST',
        icon : 'b-fa b-fa-fw b-fa-arrow-right',
        onItem({ eventRecord }) {
          console.log(eventRecord);
        }
      }
    }
  };

setting showRemoveRowInContextMenu = false removes only item "removeRow" in the context Menu.


Post by pmiklashevich »

3.1.3 is quite old version. ContextMenu is deprecated already. But you can still find the docs: https://www.bryntum.com/docs/scheduler/#Grid/feature/ContextMenu#config-cellItems
Use "cellItems" instead of "items" and pass an array of items

    contextMenuConf = {
        cellItems : [{
            text : 'TEST',
            icon : 'b-fa b-fa-fw b-fa-arrow-right',
            onItem({ eventRecord }) {
                console.log(eventRecord);
            }
        }]
    }

If you consider the possibility of upgrading, please check out these guides:
https://www.bryntum.com/docs/grid/#guides/upgrades/4.0.0.md#context-menu-refactoring (Grid)
https://www.bryntum.com/docs/scheduler/#guides/upgrades/4.0.0.md#context-menu (Scheduler)

Pavlo Miklashevych
Sr. Frontend Developer


Post by sanid »

Thanks man,
I updated to version 4.0.3 and managed to fix selection - it works now.
Cheers


Post Reply