Hello, I'm using Scheduler Pro 6.2.2 and I'm facing an issue when reloading the project while a group resource is collapsed.
It seems very similar to this bug: https://github.com/bryntum/support/issues/2858, which appears to have been fixed in 2021. However, the issue still occurs for me — I get the following error:
Error: Unknown identifier ModelClass-314.$.version
To provide more context, here are some relevant parts of my app:
In my resource column, I've added a combo box in the header which reloads the project when changed. The error happens only when a group is collapsed at that moment.
columns: [
{
type: 'resourceInfo',
showEventCount: true,
validNames: null,
editor: false,
sortable : false,
filterable:false,
headerRenderer({ column } : any) {
column.headerWidgets = [{
type : 'combo',
editable : false,
items : [{ value : 0, text : 'Teams' }, { value : 1, text : 'Agendas'}],
value: 0,
onAction(props : any) {
const params = {
resourceType : props.value,
};
scheduler.project.reloadData(params)
}
}];
},
},
],
In the reloadData() function, I start by cleaning all entities and stores using these methods (perhaps this extra cleanup step is triggering the bug that was supposedly fixed?):
project.replica?.removeEntities([
...project.resourceStore.records,
...project.assignmentStore.records,
...project.eventStore.records,
...project.dependencyStore.records,
...project.calendarManagerStore.records,
...project.timeRangeStore.records,
...project.resourceTimeRangeStore.records
]);
project.resourceStore.removeAll();
project.assignmentStore.removeAll();
project.eventStore.removeAll();
project.dependencyStore.removeAll();
project.calendarManagerStore.removeAll();
project.timeRangeStore.removeAll();
project.resourceTimeRangeStore.removeAll();
}
After that, I simply call project.load()
, and that's when it crashes.
Is there a workaround to prevent this error, or could this be a different variation of the bug I linked above?
Thanks!