Hello,
I have the following issue, when updating the event store the state object is not updated, bellow you have the code:
scheduler.current.schedulerInstance.eventStore.removeAssignmentsForResource(resource);
crewMemberSchedules.forEach(item => {
const color = state.statuses.find(f => f.statusId === item.crewMemberStatu.id).color;
scheduler.current.schedulerInstance.eventStore.addAsync({ name: item.statusName,
resourceId: item.crewMemberID,
draggable: true,
resizable: true,
startDate: new Date(item.startDate),
endDate: new Date(item.endDate),
eventColor: state.statusIndex === ONBOARD_INDEX ? new Date(item.startDate) < Date.now()
&& new Date(item.endDate) > Date.now() ? ONBOARD_COLOR : color : color,
crewMemberId: item.crewMemberID,
scheduleId: item.objectId,
index: state.statusIndex,
isRecurrence: hasValue(item.recurrenceID),
recurrenceId: item.recurrenceID,
}, false);
});
scheduler.current.schedulerInstance.eventStore.commit();
scheduler.current.schedulerInstance.repaintEventsForResource(resource);
In the bryntum scheduler I use the "events" state object to populate the event store as you can see in the picture
However, when I modify the events store the ui is updated but the state object is not.
Any solution?
Best regards