Hi I am using scheduler 5.2.2v with angular 13.
I want to move event to another resource by change the "resourceId" parameter.
After the change the event moves to the destination resource(in second click) but when I look on the event's resourceId parameter the value inside is the previous resource id.
I create demo that based on yours angular 11 demo 5.2.4v, I add some dummy resource and add button that move all events to this resource.
moveToDummy() {
this.scheduler.eventStore.beginBatch();
this.scheduler.eventStore.getRange().forEach((event: EventModel) => {
event.resourceId = 'r0';
});
this.scheduler.eventStore.endBatch();
setTimeout(() => {
console.log(this.scheduler.eventStore.getRange().map((event: EventModel) => {
return { eventName: event.name, resource: event.resourceId };
}));
}, 3000);
}
And listen to event click event that print event's resource id:
onEventClick(event){
console.log(event.eventRecord.resourceId);
}
Dummy resource id is "r0"
in the consoles you can see that the resource id is the previous resource id and not the current:
For reproduce:
1) Click on the custom button that move the jobs(first click not work don't know why) twice.
2) See the console after 3 seconds will print the new state.
3) Click on the event you will see in the console the resource id.
I did something wrong?