v7.3.0

ResourceStore

A store holding all the resources to be rendered into a Scheduler.

This store only accepts a model class inheriting from ResourceModel.

A ResourceStore is usually connected to a project, which binds it to other related stores (EventStore, AssignmentStore and DependencyStore). The project also handles references (assignments, events) to related records for the records in the store.

Resolving the references happens async, records are not guaranteed to have up to date references until calculations are finished. To be certain that references are resolved, call await project.commitAsync() after store actions. Or use one of the xxAsync functions, such as loadDataAsync().

Using commitAsync():

resourceStore.data = [{ id }, ...];

// references (assignments, events) not resolved yet

await resourceStore.project.commitAsync();

// now they are

Using loadDataAsync():

await resourceStore.loadDataAsync([{ id }, ...]);

// references (assignments, events) are resolved

See also

No results

Properties

Properties are getters/setters or publicly accessible variables on this class