We would like to feed the scheduler pro component with data loaded on demand from a server backend. The dataset is large, we cannot put everything on the client. We have around 1600 resources and around 4000 events each per year.
We have single assignment and the data is coming in a pre-indexed format. Adding event to a event store will run dayindex over them again. Is there a possibility to use our index for the lookup and skip day index?
Is it possible to create an event store with different mixins and replace GetEvents and DayIndex? Is it a supported use case?
Yes, you can have a custom event store with custom methods to override as you need, we have some examples in our demos, but a sample would be
/**
* Custom Task Store
*
* Taken from the vanilla dragfromgrid example
*/
import { EventStore } from '@bryntum/scheduler';
import Task from './Task';
export default class CustomStore extends EventStore {
// Example of custom default configuration
static get defaultConfig() {
return {
modelClass : Task
};
}
afterLoadData() {
// Rewrite your custom config for this
}
}
Is it possible to extend SchedulerBasicEvent as basis of our event?
The Pro event contains many things like calculation of earlyStartDateConstraintIntervals etc...
Or when I would overwrite the afterLoadData method, those calculations would not run?
How can I instantiate a model class correctly? Until now we just added JS object into the EventStore like:
eventStore.add([{id: 1, startDate: new Date(), ....}, ...]);