Hi,
We are encountering an issue with project.applyProjectChanges (and eventStore.applyChangeset) in Bryntum SchedulerPro, which started after upgrading to version 6.x. Currently, we are on version 6.1.0.
Problem Description:
Our application receives change events from our backend to update events in the SchedulerPro. When we use project.applyProjectChanges() with a payload containing updated event data (including new startDate and endDate values in the events: { updated: [...] } part of the changes object), we've observed that the startDate of the event is often not updated in the UI or the store.
Interestingly, if the duration of the event changes, the event bar in the scheduler does resize, indicating that the duration or endDate change is being partially processed. However, the event's startDate remains fixed, and the resizing seems to occur only by adjusting the event's endDate or duration.
Working Workaround (but with concerns):
We've found that if we bypass applyProjectChanges for event updates and instead use a direct store manipulation like:
const eventRecord = scheduler.project.eventStore.getById(eventId);
if (eventRecord) {
eventRecord.set(updatedEventDataFromBackend); // updatedEventDataFromBackend contains new startDate, endDate etc.
}
await scheduler.project.commitAsync();
This approach correctly updates both the startDate and endDate of the event, and everything functions as expected visually and in the data.
Our Concerns:
While eventRecord.set() works, we are concerned this is not the optimal or intended method for handling many updates, additions, or deletions that come from backend events. applyProjectChanges seems designed for such batch operations. We are unsure if iterating and calling .set() for each change is the most performant way to handle this, especially for larger datasets or frequent updates.