LazyLoadCrudManager
Configs
4
Configs
4If set to true, or a config object, this makes the CrudManager load records only when needed. When a record
or a date range that is not already loaded is requested, a load request will be made to the specified URL.
More more details about lazy loading, see the guide
| Parameter | Type | Description |
|---|---|---|
lazyLoad | Object | Lazy load config |
lazyLoad.chunkSize | Number | The number of records to be loaded before and after the requested index (only affects the ResourceStore). |
bufferUnit | DurationUnit | Used together with bufferAmount to calculate the start and end dates of each load request. The value is added to the current visible start or end date. Defaults to the visible time span length (does not affect ResourceStore). |
bufferAmount | Number | See |
The number of Resource records each page should contain, when using remotePaging
If set to true, this makes the CrudManager load pages of data, instead of loading the complete dataset at
once. The requests made to the loadUrl will contain
params with info about the current dataset being requested:
page- The resource pagepageSize- The resource page sizestartDate- The start date of the calculated timespanendDate- The end date of the calculated timespan
For more details about paging, see the guide
When the CrudManager/Project is configured with lazyLoad set to true, you can configure
your own data fetching logic by implementing this function. Doing this will override the built-in fetching
mechanism using the loadUrl.
When implementing this, it is expected that what is returned is an object fulfilling the contract of a regular CrudManager/Project load call.
| Parameter | Type | Description |
|---|---|---|
params | LazyLoadCrudManagerRequestParams | Object containing info of what data is requested |
Properties
3
Properties
3Class hierarchy
Lazy Loading
If set to true, or a config object, this makes the CrudManager load records only when needed. When a record
or a date range that is not already loaded is requested, a load request will be made to the specified URL.
More more details about lazy loading, see the guide
| Parameter | Type | Description |
|---|---|---|
lazyLoad | Object | Lazy load config |
lazyLoad.chunkSize | Number | The number of records to be loaded before and after the requested index (only affects the ResourceStore). |
bufferUnit | DurationUnit | Used together with bufferAmount to calculate the start and end dates of each load request. The value is added to the current visible start or end date. Defaults to the visible time span length (does not affect ResourceStore). |
bufferAmount | Number | See |
Typedefs
2
Typedefs
2An object containing details about the received data used for lazy and paged loading
| Parameter | Type | Description |
|---|---|---|
resources | Object | |
resources.rows | Object[] | |
resources.total | Number | |
events | Object | |
events.rows | Object[] | |
assignments | Object | |
assignments.rows | Object[] | |
resourceTimeRanges | Object | |
resourceTimeRanges.rows | Object[] | |
timeRanges | Object | |
timeRanges.rows | Object[] | |
calendars | Object | |
calendars.rows | Object[] |
An object containing details about the requested data
| Parameter | Type | Description |
|---|---|---|
startIndex | Number | The index of the first record being requested |
count | Number | The number of records being requested |
startDate | Date | The startDate of the requested date range (only if applicable) |
endDate | Date | The endDate of the requested date range (only if applicable) |
parentId | String | Number | The parentId for which to load children (only if Resource store is a tree store) |
stores | String[] | The id's of the stores which the CrudManager requests data for |