Our pure JavaScript Scheduler component


Post by jedgeley »

I want to add my functionalities after clicking "Unassign" ...... I have tried adding it into onItem() but i am unable to add. Can anyone suggest me were i needs to add my function. I have the code with me to perform after clicking "unassign" . So can anyone help me on this!

 unassign: {                                    
text: 'Unassign',
weight: 200, onItem: (
{
eventRecord, resourceRecord }) => eventRecord.unassign(resourceRecord)
}

Post by mats »

Please use CODE tags when posting code.

We'll need a proper test case to assist you.


Post by sergey.maltsev »

Hi!

You could use EventContextMenu feature to customize menu.
For example add your own menu Item and remove existing with unassignEvent : false

    features : {
        eventContextMenu : {
            // Add extra items shown for each event
            items : {
                // unassignEvent : false,  <---- Completely disable item
                unassignEvent : {
                    onItem({ eventRecord }) {
                        console.log('Unassign Event');
                    }
                },
                myUnassignEvent : {
                    text : 'My Unassign Event',
                    cls  : 'b-separator',
                    onItem({ eventRecord }) {
                        console.log('My Unassign Event');
                    }
                }
            }
        }
    },

See sample app here
https://www.bryntum.com/docs/scheduler/#Scheduler/feature/EventContextMenu


Post by jedgeley »

Thanks a ton. Its working now.


Post Reply