Hello Bryntum dev team,
I am writing to you regarding an issue which occurred while using the Scheduler Pro product.
Error details
The error we get is:
ObjectName: Resources
Event: onReady
HandlerType: userDefined
TypeError: Cannot read property 'getEvents' of undefined
In the next lines I will explain how I reproduce the error.
Reproducing the error
When I create the Scheduler Pro project, I create empty stores for the data.
const scheduler = new bryntum.schedulerpro.SchedulerPro({
appendTo: 'schedulerpro-container',
project: {
resourceStore: {
useRawData: true,
data: []
}
}
})
After that on the onReady event (when our data from the server is loaded), I assign our data to the store in the required format.
var dataListResources = []
dataListResources.push({"id": 1, "name": “John Doe”}, {"id": 2, "name": “Jane Doe”} )
scheduler.store.data = dataListResources
Respectevly the othe stores:
// Events
scheduler.events = dataListEvents
//Assignments
scheduler.assignments = dataListAssignments
On the initial load everything works as expected. The problem appears after I change the data in my dataset. The required behavior is to dynamically update the visualization of the project. Instead of that I get the error described in the “Error details” section.
Everything was working as expected while I was on the Scheduler component. The issue appeared when I migrated from Scheduler to Scheduler Pro.
Can you please clarify why the error is occurring in the Scheduler Pro tool. Am I missing something?
Best Regards,
Aarshev