Our pure JavaScript Scheduler component


Post by 14165@ramco.com »

Hi there,

How to disable "Edit Event" pop up in Bryntum Scheduler(in React).I tried below code but not working.

 eventMenuFeature={eventContextMenu}
var eventContextMenu = {
      
items: { deleteEvent: false, editEvent: false, View: { text: 'View', cls: 'my-menu-item', onItem: (data: any) => { DDpopUpData(data.eventRecord.data.tripPlanId, data.eventRecord.data.legId) OpenDispatchDocumentSummaryDialog(); } }, Remove: { text: 'Remove', onItem: (data: any) => { console.log("event data::::data", data) // dispatch trip_leg_excution (DELETE) const { legId, resourceId, tripPlanId } = data.eventRecord.originalData; const payload = { legId, resourceId, tripPlanId, tripData: state.main_state.tripplan.filter((el: any) => { return el.TripPlanID === tripPlanId; }) } // setTripPlanNo(tripPlanId) // let tripDataOutput:any=[]; // tripDataOutput= state.main_state.tripplan.filter((el: any) => { // return el.TripPlanID === payload.tripPlanId; // }) // tripDataOutput = payload.tripData; console.log("remove payload data", payload); // console.log("remove payload output",tripDataOutput); dispatch({ type: 'EXECUTE_TRIP_LEG_EXECUTION_REMOVE', payload }) } }, AddTrip: { text: 'Add to New Trip', cls: 'my-menu-item', onItem: (data: any) => { console.log("event data::::data", data) // dispatch trip_leg_excution (DELETE) const { legId, tripPlanId } = data.eventRecord.originalData; const targetTripID: any = "New Trip"; const payload = { TargetTripID: targetTripID, BackToID: ref_BackTo.current, ShippointID: ref_ShipTo.current, IsPlanPreloadLeg: ref_PrepLoad.current, IsBackhaul: ref_BackHaul.current, IsPlanforPrimemover: ref_PrimeMover.current, legId, tripPlanId, tripData: state.main_state.tripplan.filter((el: any) => { return el.TripPlanID === tripPlanId; }) } // tripDataOutput = payload.tripData; console.log("remove payload data", payload); //console.log("remove payload output",tripDataOutput); dispatch({ type: 'EXECUTE_TRIP_LEG_EXECUTION_ADD', payload }) } } } }
Attachments
Screenshot (194).png
Screenshot (194).png (132.62 KiB) Viewed 5859 times

Post by pmiklashevich »

You can disable EventEdit feature completely by setting it to "false". This will also remove the item from the context menu.

eventEditFeature = {false}

If you disable the editEvent item in EventMenu, the editor is available and can be opened by double click or programmatically:

eventMenuFeature = {{ items : { editEvent : false }}}

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply