batchUpdate
Description
Updates multiple events at once
batchUpdate: (callback: SchedulerCallback, noRedraw?: boolean) => void
Parameters
callback- (required) function - the callback functionnoRedraw- (optional) boolean - optional, specifies if Scheduler should repaint the chart after the callback function; true - not to repaint and false (by default) - to repaint
Example
scheduler.batchUpdate(function(){
const events = scheduler.getEvents();
for(var i = 0; i < events.length; i++){
const event = events[i];
event.start_date = scheduler.date.add(event.start_date, 1, "day");
event.end_date = scheduler.date.add(event.end_date, 1, "day");
scheduler.updateEvent(event.id);
}
});
Details
You can use this method to update multiple events at once with a single re-rendering instead of making multiple updates with multiple re-renderings.
Related API
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.