[INFO REQ] lwc scheduler , intercepte drag and drop
Posted: Mon Nov 28, 2022 6:32 pm
by frederick45
Hi,
to update event in salesforce, i use this :
this.scheduler.eventStore.on({
update : this.onEventUpdate,
//add : this.onEventAdd,
//remove : this.onEventRemove,
thisObj : this
});
i want to know how to manage drag and drop in my scheduler
BR
Re: [INFO REQ] lwc scheduler , intercepte drag and drop
Re: [INFO REQ] lwc scheduler , intercepte drag and drop
Posted: Mon Nov 28, 2022 11:21 pm
by frederick45
i want to drag and drop an event, and save it in Salesforce
Re: [INFO REQ] lwc scheduler , intercepte drag and drop
Posted: Tue Nov 29, 2022 10:48 am
by Maxim Gorkovsky
When you move an event in a schedule it gets new start/end values - i.e. field changes. And changes in fields are passed in the update event on the store. So, update listener should do the job.
Re: [INFO REQ] lwc scheduler , intercepte drag and drop
Posted: Tue Nov 29, 2022 10:59 am
by frederick45
hi,
when i modify date or ressourceId, it's working, but it's does'nt perform the update event when i drag and drop the event.I don't see the trace console log
this.scheduler.eventStore.on({
update : this.onEventUpdate,
thisObj : this
});
************************************************
onEventUpdate(data)
{
let record = data.record;
let changes = data.changes;
console.log('onEventUpdate');
//event's employee is update => delete event and create new
if(JSON.stringify(changes).includes('resourceId'))
{
//delete event
this.deleteEventJS(record.id, JSON.stringify(changes));
//insert event
this.insertEventJS(record.id, JSON.stringify(changes));
}
else //data update except employee
{
this.updateEventJS(record.id, JSON.stringify(changes));
}
}
Re: [INFO REQ] lwc scheduler , intercepte drag and drop
no log, it's KO.
each time i do a drag and drop, i have this log from google developper console
[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952